zj
2024-06-03 3cab39d85e5e43b8cc95ab82c9a914386b71c999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package org.example.websocket.config;
 
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
 
/**
 * @ClassDescription: websocket配置类
 * 该配置类用于创建ServerEndpoint注解,此注解用在类上,使得此类成为服务端websocket
 * @JdkVersion: 1.8
 * @Created: 2023/8/31 14:56
 */
@Configuration
public class WsServerConfig {
    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return  new ServerEndpointExporter();
    }
}