aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/juick/ws/XMPPConnection.java5
-rw-r--r--src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java2
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) {