aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java4
1 files changed, 3 insertions, 1 deletions
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("*");
}