diff options
-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) |