Исправлена ошибка WebSocket
This commit is contained in:
@@ -56,6 +56,8 @@ public class ApplicationConfiguration extends WebSecurityConfigurerAdapter imple
|
||||
|
||||
@Override
|
||||
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
|
||||
registry.addHandler(webSocketHandler, "/api/ws").withSockJS();
|
||||
registry.addHandler(webSocketHandler, "/api/ws")
|
||||
.setAllowedOrigins("*")
|
||||
.withSockJS();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,9 +7,11 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.web.socket.config.annotation.EnableWebSocket;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableScheduling
|
||||
@EnableWebSocket
|
||||
public class PackmateApplication {
|
||||
|
||||
@Value("${enable-capture}")
|
||||
|
||||
Reference in New Issue
Block a user