diff options
author | Vitaly Takmazov | 2016-06-28 11:23:34 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-06-28 11:23:34 +0300 |
commit | f2387bcc06dca0bf3368f32a99a6ec74a7381ccd (patch) | |
tree | 4f43def21de08cbdf9a09dca66ba01ba5f7b22c1 /src/main/java/com/juick/ws | |
parent | a3b1c3f5ea8248ab9060bc773aa819ca4b090bee (diff) |
fix xmpp component wiring
Diffstat (limited to 'src/main/java/com/juick/ws')
-rw-r--r-- | src/main/java/com/juick/ws/XMPPConnection.java | 5 | ||||
-rw-r--r-- | src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/com/juick/ws/XMPPConnection.java b/src/main/java/com/juick/ws/XMPPConnection.java index 9ed3d0cd..5d4fbce9 100644 --- a/src/main/java/com/juick/ws/XMPPConnection.java +++ b/src/main/java/com/juick/ws/XMPPConnection.java @@ -28,6 +28,7 @@ import java.util.stream.Collectors; public class XMPPConnection implements Runnable, Stream.StreamListener, Message.MessageListener { private static final Logger logger = Logger.getLogger(XMPPConnection.class.getName()); + @Inject JdbcTemplate sql; Stream xmpp; String xmppPassword; @@ -35,9 +36,7 @@ public class XMPPConnection implements Runnable, Stream.StreamListener, Message. @Inject WebsocketComponent ws; - @Inject - public XMPPConnection(JdbcTemplate sql, String password) { - this.sql = sql; + public XMPPConnection(String password) { xmppPassword = password; ms = new MessageSerializer(); new Thread(this).start(); diff --git a/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java b/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java index a298d0a0..9fd75bb0 100644 --- a/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java +++ b/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java @@ -43,7 +43,7 @@ public class WebsocketConfiguration extends WebMvcConfigurerAdapter implements W } @Bean XMPPConnection xmpp() { - return new XMPPConnection(jdbc(), env.getProperty("xmpp_password")); + return new XMPPConnection(env.getProperty("xmpp_password")); } @Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { |