@@ -0,0 +1,918 @@
+package com.lance.websocket.config;%0A%0Aimport org.springframework.context.annotation.Bean;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.web.socket.WebSocketHandler;%0Aimport org.springframework.web.socket.config.annotation.WebSocketConfigurer;%0Aimport org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;%0A%0Aimport com.lance.websocket.service.EchoService;%0Aimport com.lance.websocket.service.EchoServiceImpl;%0A%0A@Configuration%0Apublic class WebSocketConfig implements WebSocketConfigurer%7B%0A%0A%09@Override%0A%09public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) %7B%0A%09%09registry.addHandler(echoWebSocketHandler(), %22/echo%22).withSockJS();%0A%09%7D%0A%09%0A%09@Bean%0A%09public WebSocketHandler echoWebSocketHandler() %7B%0A%09%09return new EchoWebSocketHandler(echoService());%0A%09%7D%0A%09%0A%09@Bean%0A%09public EchoService echoService() %7B%0A%09%09return new EchoServiceImpl(%22Did you say %5C%22%25s%5C%22?%22);%0A%09%7D%0A%7D%0A

add websocket config