From c86e609b78b366c59a6f74f8aa4b895b8d965234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Mon, 19 Aug 2024 09:10:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86swagger=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/socketio/config/SocketIOConfig.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gxwebsoft/common/core/socketio/config/SocketIOConfig.java b/src/main/java/com/gxwebsoft/common/core/socketio/config/SocketIOConfig.java index 1097481..3fe7fd0 100644 --- a/src/main/java/com/gxwebsoft/common/core/socketio/config/SocketIOConfig.java +++ b/src/main/java/com/gxwebsoft/common/core/socketio/config/SocketIOConfig.java @@ -1,8 +1,10 @@ package com.gxwebsoft.common.core.socketio.config; +import com.corundumstudio.socketio.SocketIOServer; import com.gxwebsoft.common.core.config.ConfigProperties; import com.gxwebsoft.common.core.security.JwtSubject; import com.gxwebsoft.common.core.security.JwtUtil; +import com.gxwebsoft.common.core.socketio.cache.ClientCache; import com.gxwebsoft.common.core.socketio.handler.SocketIOHandler; import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.common.system.service.UserService; @@ -71,10 +73,10 @@ public class SocketIOConfig implements InitializingBean { config.setKeyStorePassword("123456"); // 设置证书密码 // 启动socket服务 -// SocketIOServer server = new SocketIOServer(config); -// server.addListeners(socketIOHandler); -// server.start(); -// ClientCache.setSocketIOServer(server); -// logger.debug("Netty SocketIO启动:{}:{}",host,port); + SocketIOServer server = new SocketIOServer(config); + server.addListeners(socketIOHandler); + server.start(); + ClientCache.setSocketIOServer(server); + logger.debug("Netty SocketIO启动:{}:{}",host,port); } }