diff options
author | Vitaly Takmazov | 2016-11-30 00:27:23 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-11-30 00:27:23 +0300 |
commit | 3e783602987483bbd2ee5791020894891d39b016 (patch) | |
tree | 14c710bd9929aa69d3b3a0b8a74fc41852a8ac25 /juick-ws/src/main/java/com/juick/ws/configuration | |
parent | a0414bcd43b5b07018fcd3ba0013c0ea11e26552 (diff) |
juick-ws: update to data services
Diffstat (limited to 'juick-ws/src/main/java/com/juick/ws/configuration')
-rw-r--r-- | juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java | 10 | ||||
-rw-r--r-- | juick-ws/src/main/java/com/juick/ws/configuration/WebsocketInitializer.java | 2 |
2 files changed, 6 insertions, 6 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 e7f0042e..4c20001a 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 @@ -1,12 +1,13 @@ package com.juick.ws.configuration; +import com.juick.configuration.DataConfiguration; import com.juick.ws.WebsocketComponent; import com.juick.ws.XMPPConnection; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; import org.springframework.context.annotation.PropertySource; import org.springframework.core.env.Environment; -import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.web.socket.config.annotation.EnableWebSocket; import org.springframework.web.socket.config.annotation.ServletWebSocketHandlerRegistry; import org.springframework.web.socket.config.annotation.WebSocketConfigurer; @@ -21,20 +22,19 @@ import javax.inject.Inject; @Configuration @EnableWebSocket @PropertySource("classpath:juick.conf") +@Import(DataConfiguration.class) class WebsocketConfiguration implements WebSocketConfigurer { @Inject private Environment env; - @Inject - private JdbcTemplate jdbc; @Bean public WebsocketComponent wsHandler() { - return new WebsocketComponent(jdbc); + return new WebsocketComponent(); } @Bean public XMPPConnection ws() { - return new XMPPConnection(env, wsHandler(), jdbc); + return new XMPPConnection(env, wsHandler()); } @Override diff --git a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketInitializer.java b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketInitializer.java index 751da635..a754f1a9 100644 --- a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketInitializer.java +++ b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketInitializer.java @@ -13,7 +13,7 @@ public class WebsocketInitializer extends AbstractAnnotationConfigDispatcherServ @Override protected Class<?>[] getRootConfigClasses() { - return new Class<?>[]{DataConfiguration.class, WebsocketConfiguration.class}; + return new Class<?>[]{WebsocketConfiguration.class}; } @Override |