From 714614963bb5d6706124da0186cb59a8e11825a2 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 16 Mar 2018 17:24:59 +0300 Subject: boot: fix configurations --- .../juick/server/configuration/ApiAppConfiguration.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server') 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 c92aaa21..6c4cac8b 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 @@ -70,21 +70,13 @@ public class ApiAppConfiguration implements WebMvcConfigurer, WebSocketConfigure private String serviceUser; @Value("${websocket_url:ws://localhost:8080/ws/}") private String baseUri; - @Lazy - @Bean - public JuickServerComponent juickServerComponent() { - return new JuickServerComponent(); - } - @Lazy - @Bean - public JuickServerReconnectManager juickServerReconnectManager() { - return new JuickServerReconnectManager(); - } + @Inject + public JuickServerComponent juickServerComponent; @Bean public WebSocketConnectionManager connectionManager() { String websocketURI = UriComponentsBuilder.fromUriString(baseUri) .queryParam("hash", userService.getHashByUID(userService.getUIDbyName(serviceUser))).build().toUriString(); - return new WebSocketConnectionManager(client(), juickServerComponent(), websocketURI); + return new WebSocketConnectionManager(client(), juickServerComponent, websocketURI); } @Bean public StandardWebSocketClient client() { -- cgit v1.2.3