增加项目README.md
This commit is contained in:
@ -15,7 +15,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
* @author : heibaiying
|
||||
* @description : 自定义消息处理类
|
||||
*/
|
||||
public class CustomerHandler extends TextWebSocketHandler {
|
||||
public class CustomHandler extends TextWebSocketHandler {
|
||||
|
||||
private Map<String, WebSocketSession> nameAndSession = new ConcurrentHashMap<>();
|
||||
|
@ -6,9 +6,8 @@ import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
|
||||
import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;
|
||||
|
||||
/**
|
||||
* @author : 罗祥
|
||||
* @author : heibaiying
|
||||
* @description :websocket 配置
|
||||
* @date :create in 2018/12/27
|
||||
*/
|
||||
@Configuration
|
||||
@EnableWebSocket
|
||||
@ -16,6 +15,6 @@ public class WebSocketConfig implements WebSocketConfigurer {
|
||||
|
||||
@Override
|
||||
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
|
||||
registry.addHandler(new CustomerHandler(), "/socket").addInterceptors(new CustomHandshakeInterceptor());
|
||||
registry.addHandler(new CustomHandler(), "/socket").addInterceptors(new CustomHandshakeInterceptor());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user