Blame view

src/main/java/com/huaheng/mobile/websocket/WebSocketConfig.java 437 Bytes
1
package com.huaheng.mobile.websocket;
2
3
4
5
6
7

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
8
 * 配置websocket并开启
9
10
11
12
 */
@Configuration
public class WebSocketConfig {
    @Bean
13
    public ServerEndpointExporter serverEndpointExporter(){
14
15
        return new ServerEndpointExporter();
    }
16
17
}