diff options
author | Vitaly Takmazov | 2016-08-08 11:17:45 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-08-08 11:17:45 +0300 |
commit | 32111158ba5fd2481511cc2b5f09f921a1463bc1 (patch) | |
tree | 7efbb442155a12d6af2e29b746c1700edb982f39 /juick-ws/src/main/java/com/juick/ws/components | |
parent | 7ac5b7d2a20176587f6adec6ac1f77ca43032ec0 (diff) |
juick-ws: fix Environment injection
Diffstat (limited to 'juick-ws/src/main/java/com/juick/ws/components')
3 files changed, 6 insertions, 9 deletions
diff --git a/juick-ws/src/main/java/com/juick/ws/components/CrosspostComponent.java b/juick-ws/src/main/java/com/juick/ws/components/CrosspostComponent.java index 289e9809..8cda122e 100644 --- a/juick-ws/src/main/java/com/juick/ws/components/CrosspostComponent.java +++ b/juick-ws/src/main/java/com/juick/ws/components/CrosspostComponent.java @@ -63,10 +63,9 @@ public class CrosspostComponent implements JuickComponent, DisposableBean, Strea Stream xmpp; String twitter_consumer_key; String twitter_consumer_secret; - @Inject - Environment env; - public CrosspostComponent() { + @Inject + public CrosspostComponent(Environment env) { logger.info("component initialized"); try { twitter_consumer_key = env.getProperty("twitter_consumer_key", ""); diff --git a/juick-ws/src/main/java/com/juick/ws/components/PushComponent.java b/juick-ws/src/main/java/com/juick/ws/components/PushComponent.java index b219d9d7..fb26b935 100644 --- a/juick-ws/src/main/java/com/juick/ws/components/PushComponent.java +++ b/juick-ws/src/main/java/com/juick/ws/components/PushComponent.java @@ -79,10 +79,9 @@ public class PushComponent implements JuickComponent, DisposableBean, Stream.Str Socket socket; Stream xmpp; Sender GCMSender; - @Inject - Environment env; - public PushComponent() { + @Inject + public PushComponent(Environment env) { logger.info("component initialized"); wns_application_sip = env.getProperty("wns_application_sip", ""); wns_client_secret = env.getProperty("wns_client_secret", ""); diff --git a/juick-ws/src/main/java/com/juick/ws/components/XMPPComponent.java b/juick-ws/src/main/java/com/juick/ws/components/XMPPComponent.java index fb67e5a2..6ce2482d 100644 --- a/juick-ws/src/main/java/com/juick/ws/components/XMPPComponent.java +++ b/juick-ws/src/main/java/com/juick/ws/components/XMPPComponent.java @@ -59,10 +59,9 @@ public class XMPPComponent implements JuickComponent, DisposableBean, Stream.Str private final List<CacheEntry> outCache = Collections.synchronizedList(new ArrayList<>()); private JdbcTemplate sql; final public HashMap<String, StanzaChild> childParsers = new HashMap<>(); - @Inject - Environment env; - public XMPPComponent() { + @Inject + public XMPPComponent(Environment env) { logger.info("component initialized"); try { HOSTNAME = env.getProperty("hostname"); |