kk пре 1 месец
родитељ
комит
970ff5b463

+ 22 - 0
game-business/src/main/java/com/game/business/config/GameSevenConfig.java

@@ -0,0 +1,22 @@
+package com.game.business.config;
+
+import com.game.business.util.Common;
+import com.game.business.websocket.WebSocketConnent;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.stereotype.Component;
+
+@Component
+@EnableAsync
+public class GameSevenConfig implements CommandLineRunner {
+
+    public static WebSocketConnent webSocketConnent;
+
+    @Override
+    @Async
+    public void run(String... args) throws Exception {
+        webSocketConnent = new WebSocketConnent(Common.WS_GAME_SEVEN_URL, Common.WS_GAME_SEVEN_REMARK_URL, Common.GAME_SEVEN_NAME);
+        webSocketConnent.connect();
+    }
+}

+ 6 - 0
game-business/src/main/java/com/game/business/util/Common.java

@@ -20,6 +20,9 @@ public class Common {
     public static final String GAME_SIX_NAME = "six";
     public static final String GAME_SIX_CODE = "6";
 
+    public static final String GAME_SEVEN_NAME = "seven";
+    public static final String GAME_SEVEN_CODE = "7";
+
 
 //    public static final String WS_GAME_ONE_URL = "ws://47.115.59.17:8000/ws";
 //    public static final String WS_GAME_ONE_REMARK_URL = "ws://47.115.59.17:8000/ws";
@@ -51,5 +54,8 @@ public class Common {
     public static final String WS_GAME_SIX_URL = "ws://120.79.41.13:8000/ws";
     public static final String WS_GAME_SIX_REMARK_URL = "ws://120.79.41.13:8000/ws";
 
+    public static final String WS_GAME_SEVEN_URL = "ws://120.79.41.13:8000/ws";
+    public static final String WS_GAME_SEVEN_REMARK_URL = "ws://120.79.41.13:8000/ws";
+
     public static Map<String, Session> sessionMap = new HashMap<>();
 }