diff options
author | Vitaly Takmazov | 2016-06-28 14:40:55 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-06-28 14:40:55 +0300 |
commit | 9f2503cf924d79f00cb0956d37daf10e7a163163 (patch) | |
tree | 1f197cd057b9ad6b1f2fde24b0cf3c3397e3b97f /src/main/java/com/juick/ws | |
parent | a2faab09d3a8604ffe24dd337a3ab099f132e311 (diff) |
gretty
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 | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/main/java/com/juick/ws/XMPPConnection.java b/src/main/java/com/juick/ws/XMPPConnection.java index 802271a0..8194862c 100644 --- a/src/main/java/com/juick/ws/XMPPConnection.java +++ b/src/main/java/com/juick/ws/XMPPConnection.java @@ -31,15 +31,14 @@ public class XMPPConnection implements Runnable, Stream.StreamListener, Message. @Inject JdbcTemplate sql; - @Inject - Environment env; Stream xmpp; String xmppPassword; MessageSerializer ms; @Inject WebsocketComponent ws; - public XMPPConnection() { + @Inject + public XMPPConnection(Environment env) { xmppPassword = env.getProperty("xmpp_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 46ef8486..b0393038 100644 --- a/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java +++ b/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java @@ -41,10 +41,6 @@ public class WebsocketConfiguration extends WebMvcConfigurerAdapter implements W dataSource.setUrl(env.getProperty("datasource_url")); return new JdbcTemplate(dataSource); } - @Bean - XMPPConnection xmpp() { - return new XMPPConnection(); - } @Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(wsHandler(), "/"); |