diff options
author | Vitaly Takmazov | 2018-04-11 11:20:19 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-04-11 11:20:19 +0300 |
commit | 10e624937adaf2dc6cdfad9f214552e6a2fcd9eb (patch) | |
tree | ed363d4e7fa865dc2388e27232d7298badd2d93a /juick-server | |
parent | 546c8fed84325477fd48a1ef7197eac53a2596aa (diff) |
server: twitter4j initialization fix
Diffstat (limited to 'juick-server')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/TwitterManager.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/TwitterManager.java b/juick-server/src/main/java/com/juick/server/TwitterManager.java index 8e000b07..d386423b 100644 --- a/juick-server/src/main/java/com/juick/server/TwitterManager.java +++ b/juick-server/src/main/java/com/juick/server/TwitterManager.java @@ -31,6 +31,7 @@ import twitter4j.TwitterFactory; import twitter4j.conf.ConfigurationBuilder; import javax.annotation.Nonnull; +import javax.annotation.PostConstruct; import javax.inject.Inject; /** @@ -49,9 +50,10 @@ public class TwitterManager { @Value("${twitter_consumer_secret:secret}") private String twitter_consumer_secret; - private final ConfigurationBuilder configurationBuilder; + private ConfigurationBuilder configurationBuilder; - public TwitterManager() { + @PostConstruct + public void init() { configurationBuilder = new ConfigurationBuilder() .setDebugEnabled(true) .setOAuthConsumerKey(twitter_consumer_key) |