diff options
Diffstat (limited to 'juick-ws/src/main/java/com/juick/ws')
-rw-r--r-- | juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java index b76545b8..194a75a5 100644 --- a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java +++ b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java @@ -18,7 +18,6 @@ package com.juick.ws.configuration; import com.juick.server.configuration.BaseWebConfiguration; -import com.juick.server.protocol.JuickProtocol; import com.juick.ws.WebsocketComponent; import com.juick.ws.XMPPConnection; import org.springframework.context.annotation.Bean; @@ -35,6 +34,8 @@ import org.springframework.web.socket.config.annotation.WebSocketConfigurer; import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry; import org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean; +import javax.annotation.Nonnull; + /** * Created by aalexeev on 11/24/16. */ @@ -54,13 +55,8 @@ public class WebsocketConfiguration extends BaseWebConfiguration implements WebS return new WebsocketComponent(); } - @Bean - public JuickProtocol protocol() { - return new JuickProtocol("https://juick.com/"); - } - @Override - public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { + public void registerWebSocketHandlers(@Nonnull WebSocketHandlerRegistry registry) { ((ServletWebSocketHandlerRegistry) registry).setOrder(Ordered.LOWEST_PRECEDENCE); registry.addHandler(wsHandler(), "/**").setAllowedOrigins("*"); } |