From af0ebe629d2692599bffaedbe6e268f71d1c970b Mon Sep 17 00:00:00 2001
From: wang <3597712270@qq.com>
Date: 星期二, 28 五月 2024 15:12:48 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
---
hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/WebSocketServer.java | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/WebSocketServer.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/WebSocketServer.java
similarity index 91%
rename from hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/WebSocketServer.java
rename to hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/WebSocketServer.java
index 5fabafa..11ce5dd 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/WebSocketServer.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/WebSocketServer.java
@@ -1,4 +1,4 @@
-package com.mes.common;
+package com.mes.tools;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
@@ -22,12 +22,6 @@
public static ConfigurableApplicationContext applicationContext;
- // 瑙e喅鏃犳硶娉ㄥ叆mapper闂 //浣跨敤鏂规硶
- // homeMapper=WebSocketServer.applicationContext.getBean(HomeMapper.class);
- public static void setApplicationContext(ConfigurableApplicationContext configurableApplicationContext) {
- WebSocketServer.applicationContext = configurableApplicationContext;
- }
-
private static final Logger log = LoggerFactory.getLogger(WebSocketServer.class);
private List<String> messages;
/**
@@ -35,8 +29,8 @@
*/
public static final Map<String, ArrayList<WebSocketServer>> sessionMap = new ConcurrentHashMap<>();
- String username;
- Session session;
+ public String username;
+ public Session session;
public WebSocketServer() {
this.messages = new ArrayList<>();
@@ -111,8 +105,6 @@
JSONObject jsonObject = new JSONObject();
jsonObject.set("message", text);
this.messages.add(text);
- this.sendMessage(jsonObject.toString()); // JSONUtil.toJsonStr(jsonObject)
-
}
@OnError
--
Gitblit v1.8.0