From 1ceef7f1d1c59e6d42d0de2647d8ddbcf573d009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E6=88=90?= <2847920761@qq.com> Date: Tue, 14 Oct 2025 17:38:15 +0800 Subject: [PATCH] 1 --- .../WebSocketConfig.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/WebSocketConfig.java diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/WebSocketConfig.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/WebSocketConfig.java new file mode 100644 index 00000000..7f2f5d36 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/WebSocketConfig.java @@ -0,0 +1,24 @@ +package org.dromara.mobileAttendanceMachine; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.socket.server.standard.ServerEndpointExporter; + +/** + * @Author 铁憨憨 + * @Date 2025/10/14 16:11 + * @Version 1.0 + * + * 系统启动就会开启ws + */ +@Configuration +public class WebSocketConfig { + + /** + * 自动注册所有标注了@ServerEndpoint的WebSocket端点 + */ + @Bean + public ServerEndpointExporter serverEndpointExporter() { + return new ServerEndpointExporter(); + } +}