aboutsummaryrefslogtreecommitdiff
path: root/juick-server
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-11 11:20:19 +0300
committerGravatar Vitaly Takmazov2018-04-11 11:20:19 +0300
commit10e624937adaf2dc6cdfad9f214552e6a2fcd9eb (patch)
treeed363d4e7fa865dc2388e27232d7298badd2d93a /juick-server
parent546c8fed84325477fd48a1ef7197eac53a2596aa (diff)
server: twitter4j initialization fix
Diffstat (limited to 'juick-server')
-rw-r--r--juick-server/src/main/java/com/juick/server/TwitterManager.java6
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)