feat: 增加websocket通知
parent
d29cfbf3ee
commit
201279abea
@ -0,0 +1,20 @@
|
|||||||
|
package com.shxy.xymanager_framework.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class WebSocketConfig {
|
||||||
|
/**
|
||||||
|
* ServerEndpointExporter 作用
|
||||||
|
*
|
||||||
|
* 这个Bean会自动注册使用@ServerEndpoint注解声明的websocket endpoint
|
||||||
|
*
|
||||||
|
* @return ServerEndpointExporter
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
public ServerEndpointExporter serverEndpointExporter() {
|
||||||
|
return new ServerEndpointExporter();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue