feat: 增加websocket通知
parent
997ea95114
commit
068f16f603
@ -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