This commit is contained in:
2025-10-14 17:38:15 +08:00
parent 0fb3fd70a6
commit 1ceef7f1d1

View File

@ -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();
}
}