Spring-xd - 尝试使用" Twittersearch"

时间:2014-12-23 11:51:59

标签: spring spring-integration spring-xd

我创建了一个流,它通过这个Spring xd代码将推文写入文件:

stream create --name javatweets --definition "twittersearch --query=java --consumerKey=<my_key>
--consumerSecret=<my_secret> | file" --deploy    

不幸的是,我收到以下错误消息:

WARN DeploymentsPathChildrenCache-0 annotation.AnnotationConfigApplicationContext - 
Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'org.springframework.integration.x.twitter.TwitterSearchChannelAdapter#0' defined in class path   resource [config/twittersearch.xml]: Cannot resolve reference to bean 'twitterTemplate' while setting  constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'twitterTemplate' defined in class path resource [config/twittersearch.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.social.twitter.api.impl.TwitterTemplate]: Constructor threw exception; nested exception is org.springframework.web.client.HttpClientErrorException: 403 Forbidden

1 个答案:

答案 0 :(得分:0)

  

HttpClientErrorException:403 Forbidden

您的凭据(consumerKey和/或consumerSecret)不正确。