From 4140a69e732bb3826c6f9782f54152d6e060af4b Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 03 四月 2024 13:06:30 +0800
Subject: [PATCH] #
---
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/websocket/MapWebsocket.java | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/websocket/MapWebsocket.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/websocket/MapWebsocket.java
index 49dad31..795d89a 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/websocket/MapWebsocket.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/websocket/MapWebsocket.java
@@ -3,15 +3,12 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
-import javax.websocket.OnClose;
-import javax.websocket.OnMessage;
-import javax.websocket.OnOpen;
-import javax.websocket.Session;
+import javax.websocket.*;
import javax.websocket.server.ServerEndpoint;
@Slf4j
@Component
-@ServerEndpoint(value = "/map/websocket")
+@ServerEndpoint(value = "/ws/map/websocket")
public class MapWebsocket {
private Session session;
@@ -34,4 +31,14 @@
log.info("{} closed", this.sessionId);
}
+ /**
+ * @ Param session
+ * @ Param error
+ */
+ @OnError
+ public void onError(Session session, Throwable error) {
+ log.error("鍙戠敓閿欒");
+ error.printStackTrace();
+ }
+
}
--
Gitblit v1.9.1