From 4de8cc4323c601189fd702c3ee6e6eff12c88e50 Mon Sep 17 00:00:00 2001 From: Stark-Industries0417 <59994664+Stark-Industries0417@users.noreply.github.com> Date: Sat, 1 Feb 2025 13:50:19 +0900 Subject: [PATCH] =?UTF-8?q?refactor=20-=20logging=20Decorator=20=EB=84=A4?= =?UTF-8?q?=EC=9D=B4=EB=B0=8D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/kotlin/game/server/config/WebSocketConfig.kt | 5 ++--- ...ebSocketHandlerDecorator.kt => LoggingRouterDecorator.kt} | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) rename game-server/src/main/kotlin/game/server/websocket/{LoggingWebSocketHandlerDecorator.kt => LoggingRouterDecorator.kt} (98%) diff --git a/game-server/src/main/kotlin/game/server/config/WebSocketConfig.kt b/game-server/src/main/kotlin/game/server/config/WebSocketConfig.kt index d90d6da..2dc3f8e 100644 --- a/game-server/src/main/kotlin/game/server/config/WebSocketConfig.kt +++ b/game-server/src/main/kotlin/game/server/config/WebSocketConfig.kt @@ -1,7 +1,6 @@ package game.server.config -import game.server.websocket.GameWebSocketHandler -import game.server.websocket.LoggingWebSocketHandlerDecorator +import game.server.websocket.LoggingRouterDecorator import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration import org.springframework.web.reactive.config.WebFluxConfigurer @@ -12,7 +11,7 @@ import org.springframework.web.reactive.socket.server.support.WebSocketHandlerAd open class WebSocketConfig : WebFluxConfigurer { @Bean - open fun webSocketHandlerMapping(loggingWebSocketHandlerDecorator: LoggingWebSocketHandlerDecorator): SimpleUrlHandlerMapping { + open fun webSocketHandlerMapping(loggingWebSocketHandlerDecorator: LoggingRouterDecorator): SimpleUrlHandlerMapping { return SimpleUrlHandlerMapping() .apply { urlMap = mapOf("/ws/game" to loggingWebSocketHandlerDecorator) diff --git a/game-server/src/main/kotlin/game/server/websocket/LoggingWebSocketHandlerDecorator.kt b/game-server/src/main/kotlin/game/server/websocket/LoggingRouterDecorator.kt similarity index 98% rename from game-server/src/main/kotlin/game/server/websocket/LoggingWebSocketHandlerDecorator.kt rename to game-server/src/main/kotlin/game/server/websocket/LoggingRouterDecorator.kt index d8f4f7a..e6117d5 100644 --- a/game-server/src/main/kotlin/game/server/websocket/LoggingWebSocketHandlerDecorator.kt +++ b/game-server/src/main/kotlin/game/server/websocket/LoggingRouterDecorator.kt @@ -11,7 +11,7 @@ import reactor.core.publisher.Flux import reactor.core.publisher.Mono @Component -class LoggingWebSocketHandlerDecorator( +class LoggingRouterDecorator( private val gameRequestRouter: GameRequestRouter, private val objectMapper: ObjectMapper ) : WebSocketHandler {