Skip to content

Commit

Permalink
Merge branch 'infra/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
kor-Chipmunk committed Feb 15, 2024
2 parents 841ce92 + 89c0e3c commit 07ae093
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1/notifications")
@RequestMapping("/v1/api/notifications")
public class NotificationController {
private final NotificationService service;

Expand Down
28 changes: 14 additions & 14 deletions src/backend/gateway-server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spring:
predicates:
- Path=/alarm/**
filters:
- RewritePath=/alarm/?(?<segment>.*), /$\{segment}
- RewritePath=/alarm/?(?<segment>.*), /v1/api/$\{segment}

- id: AUTH-SERVICE
uri: lb://AUTH-SERVER
Expand All @@ -42,21 +42,21 @@ spring:
predicates:
- Path=/chart/**
filters:
- RewritePath=/chart/?(?<segment>.*), /$\{segment}
- RewritePath=/chart/?(?<segment>.*), /v1/api/$\{segment}

- id: CHATTING-CHAT
- id: CHATTING-SERVICE-API
uri: lb://CHATTING-SERVER
predicates:
- Path=/chatting/chat/**
- Path=/chatting/v1/api/
filters:
- RewritePath=/chatting/chat/(?<segment>/?.*), /chat/$\{segment}
- RewritePath=/chatting/v1/api/(?<segment>/?.*), /v1/api/$\{segment}

- id: CHATTING-ROOM
uri: lb://CHATTING-SERVER
- id: CHATTING-SERVICE-STOMP
uri: lb:ws://CHATTING-SERVER
predicates:
- Path=/chatting/room/**
- Path=/chatting/**
filters:
- RewritePath=/chatting/room/(?<segment>/?.*), /api/v1/rooms/$\{segment}
- RewritePath=/chatting/(?<segment>/?.*), /$\{segment}

- id: FEED
uri: lb://FEED-SERVER
Expand All @@ -70,7 +70,7 @@ spring:
predicates:
- Path=/music/**
filters:
- RewritePath=/music/?(?<segment>.*), /api/v1/$\{segment}
- RewritePath=/music/?(?<segment>.*), /v1/api/$\{segment}

- id: PLAYLIST
uri: lb://PLAYLIST-SERVER
Expand All @@ -84,21 +84,21 @@ spring:
predicates:
- Path=/search/**
filters:
- RewritePath=/search/?(?<segment>.*), /$\{segment}
- RewritePath=/search/?(?<segment>.*), /v1/api/$\{segment}

- id: STREAMING
uri: lb://ws://STREAMING-SERVER
uri: lb:ws://STREAMING-SERVER
predicates:
- Path=/streaming/**
filters:
- RewritePath=/streaming/?(?<segment>.*), /streaming/$\{segment}
- RewritePath=/streaming/?(?<segment>.*), /v1/ws/streaming/$\{segment}

- id: USER
uri: lb://USER-SERVER
predicates:
- Path=/user/**
filters:
- RewritePath=/user/?(?<segment>.*), /api/v1/$\{segment}
- RewritePath=/user/?(?<segment>.*), /v1/api/$\{segment}

default-filters:
- name: AuthorizationFilter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1/albums")
@RequestMapping("/v1/api/albums")
public class AlbumController {
private final AlbumService service;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1/artists")
@RequestMapping("/v1/api/artists")
public class ArtistController {
private final ArtistService service;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1/musics")
@RequestMapping("/v1/api/musics")
public class MusicController {
private final MusicService service;
private final MusicUploaderService uploaderService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public String getFilename() {

return restClient
.post()
.uri("/upload")
.uri("/v1/api/upload")
.headers(httpHeaders -> httpHeaders.setContentType(MediaType.MULTIPART_FORM_DATA))
.body(parts)
.retrieve()
Expand Down Expand Up @@ -138,7 +138,7 @@ public String getFilename() {

return restClient
.post()
.uri("/upload")
.uri("/v1/api/upload")
.headers(httpHeaders -> httpHeaders.setContentType(MediaType.MULTIPART_FORM_DATA))
.body(parts)
.retrieve()
Expand Down
2 changes: 1 addition & 1 deletion src/backend/storage-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func listenServe() {

func registerHandlers() {
http.HandleFunc("/", handleMusicStaticFiles)
http.HandleFunc("/upload", handleUploadMusic)
http.HandleFunc("/v1/api/upload", handleUploadMusic)
}

func handleMusicStaticFiles(w http.ResponseWriter, r *http.Request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ class WsConfig(
) : WebSocketConfigurer {
override fun registerWebSocketHandlers(registry: WebSocketHandlerRegistry) {
registry
.addHandler(streamingHandler(), "/streaming")
.addHandler(streamingHandler(), "/v1/ws/streaming")
.setAllowedOrigins("*")
registry
.addHandler(streamingHandler(), "/streaming")
.addHandler(streamingHandler(), "/v1/ws/streaming")
.setAllowedOrigins("*")
.withSockJS()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RestController

@RestController
@RequiredArgsConstructor
@RequestMapping("api/v1/streaming")
@RequestMapping("/v1/api/streaming")
class StreamingRestController(
val audioLocation: String = "./static"
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class StreamingHandler(

fun getMusic(session: WebSocketSession, musicId: String): MusicDetailDTO {
return musicClient.get()
.uri("/api/v1/musics/${musicId}")
.uri("/v1/api/musics/${musicId}")
.accept(MediaType.APPLICATION_JSON)
.retrieve()
.onStatus(HttpStatusCode::is4xxClientError) { _, _ ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

@Slf4j
@RestController
@RequestMapping("/api/v1/users")
@RequestMapping("/v1/api/users")
@RequiredArgsConstructor
public class UserController {

Expand Down

0 comments on commit 07ae093

Please sign in to comment.