diff options
author | Vitaly Takmazov | 2016-06-28 11:34:25 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-06-28 11:34:25 +0300 |
commit | a2faab09d3a8604ffe24dd337a3ab099f132e311 (patch) | |
tree | cc66a7f629579e62dea8034aecb4065c86adf6a3 /src/main/java/com/juick/ws/XMPPConnection.java | |
parent | f2387bcc06dca0bf3368f32a99a6ec74a7381ccd (diff) |
fix xmpp component wiring, take 2
Diffstat (limited to 'src/main/java/com/juick/ws/XMPPConnection.java')
-rw-r--r-- | src/main/java/com/juick/ws/XMPPConnection.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/com/juick/ws/XMPPConnection.java b/src/main/java/com/juick/ws/XMPPConnection.java index 5d4fbce9..802271a0 100644 --- a/src/main/java/com/juick/ws/XMPPConnection.java +++ b/src/main/java/com/juick/ws/XMPPConnection.java @@ -8,6 +8,7 @@ import com.juick.xmpp.Message; import com.juick.xmpp.Stream; import com.juick.xmpp.StreamComponent; import com.juick.xmpp.extensions.JuickMessage; +import org.springframework.core.env.Environment; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Component; import org.springframework.web.socket.TextMessage; @@ -30,14 +31,16 @@ 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(String password) { - xmppPassword = password; + public XMPPConnection() { + xmppPassword = env.getProperty("xmpp_password"); ms = new MessageSerializer(); new Thread(this).start(); } |