1
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user