21 lines
553 B
Java
21 lines
553 B
Java
|
package com.cnbm.websocket.config;
|
||
|
|
||
|
import org.springframework.context.annotation.Bean;
|
||
|
import org.springframework.context.annotation.Configuration;
|
||
|
import org.springframework.web.socket.config.annotation.EnableWebSocket;
|
||
|
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||
|
|
||
|
/**
|
||
|
* @Author weihongyang
|
||
|
* @Date 2022/6/29 8:58 AM
|
||
|
* @Version 1.0
|
||
|
*/
|
||
|
@Configuration
|
||
|
@EnableWebSocket
|
||
|
public class WebSocketConfig {
|
||
|
@Bean
|
||
|
public ServerEndpointExporter serverEndpoint(){
|
||
|
return new ServerEndpointExporter();
|
||
|
}
|
||
|
}
|