diff options
author | Vitaly Takmazov | 2016-11-08 16:36:52 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-11-08 17:45:40 +0300 |
commit | 7270411d55c154e42c942caeaf4d4b942d72dea2 (patch) | |
tree | c102da1c5265d8eed69c3441ccdbb4c953a983ba /juick-xmpp/src/main/java/com/juick/components | |
parent | 40c1a196d019fbaf3dd8f0d8f6d1bdc8225bb7a0 (diff) |
ws: fix injection
Diffstat (limited to 'juick-xmpp/src/main/java/com/juick/components')
-rw-r--r-- | juick-xmpp/src/main/java/com/juick/components/XMPPServer.java | 4 | ||||
-rw-r--r-- | juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java b/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java index 31aa0bc7..a091d477 100644 --- a/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java +++ b/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java @@ -52,13 +52,13 @@ public class XMPPServer implements DisposableBean, Stream.StreamListener, private final List<ConnectionIn> inConnections = Collections.synchronizedList(new ArrayList<>()); private final List<ConnectionOut> outConnections = Collections.synchronizedList(new ArrayList<>()); private final List<CacheEntry> outCache = Collections.synchronizedList(new ArrayList<>()); - @Inject public JdbcTemplate jdbc; final public HashMap<String, StanzaChild> childParsers = new HashMap<>(); @Inject - public XMPPServer(Environment env, ExecutorService service) { + public XMPPServer(Environment env, ExecutorService service, JdbcTemplate jdbc) { this.service = service; + this.jdbc = jdbc; logger.info("component initialized"); try { HOSTNAME = env.getProperty("hostname"); diff --git a/juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java b/juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java index 1695de6a..7cada270 100644 --- a/juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java +++ b/juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java @@ -39,6 +39,8 @@ public class XMPPConfiguration extends WebMvcConfigurationSupport { Environment env; @Inject ExecutorService service; + @Inject + JdbcTemplate jdbc; @Bean JdbcTemplate jdbc() { @@ -78,7 +80,7 @@ public class XMPPConfiguration extends WebMvcConfigurationSupport { } @Bean public XMPPServer xmpp() { - return new XMPPServer(env, service); + return new XMPPServer(env, service, jdbc); } @Bean public ExecutorService service() { |