From 5d139bd9d7b3f65453eef29ef9806c9738891f90 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 21 Mar 2018 09:15:58 +0300 Subject: ws: lowest precedence --- .../main/java/com/juick/server/configuration/ApiAppConfiguration.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'juick-server/src/main/java/com') diff --git a/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java b/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java index 6c4cac8b..77ceb9db 100644 --- a/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java +++ b/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java @@ -27,6 +27,7 @@ import com.juick.server.component.JuickServerReconnectManager; import com.juick.service.UserService; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.*; +import org.springframework.core.Ordered; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; @@ -38,6 +39,7 @@ import org.springframework.web.servlet.view.feed.AbstractRssFeedView; import org.springframework.web.socket.client.WebSocketConnectionManager; import org.springframework.web.socket.client.standard.StandardWebSocketClient; import org.springframework.web.socket.config.annotation.EnableWebSocket; +import org.springframework.web.socket.config.annotation.ServletWebSocketHandlerRegistry; import org.springframework.web.socket.config.annotation.WebSocketConfigurer; import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry; import org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean; @@ -106,7 +108,7 @@ public class ApiAppConfiguration implements WebMvcConfigurer, WebSocketConfigure @Override public void registerWebSocketHandlers(@Nonnull WebSocketHandlerRegistry registry) { - //((ServletWebSocketHandlerRegistry) registry).setOrder(Ordered.LOWEST_PRECEDENCE); + ((ServletWebSocketHandlerRegistry) registry).setOrder(Ordered.LOWEST_PRECEDENCE); registry.addHandler(wsHandler(), "/ws/**").setAllowedOrigins("*"); } -- cgit v1.2.3