spring cloud stream 和 gcp pub sub, binder 问题
spring cloud stream and gcp pub sub, binder problem
我正在尝试使用 GCP 的 Pub Sum 作为活页夹在本地 运行 一个 SCS 应用程序。
钾
米
嗯嗯。嗯org.sm.Mpringframework.cloudkki
spring-cloud-gcp-starter-pubsub
米
这是配置l
@Configu@Configukration
@EnableBindingkklk(Source.class)
public class TimerSourcek {
@Bean
@InboundChannelAdapter(channel = "channel", poller = @Poller(fixedDelay = "1000", maxMessagesPerPoll = "1"))
public MessageSource<String> timerMessageSource() {
return () -> new GenericMessage<>(new SimpleDateFormat("HH:mm:ss").format(new Date()));
}
}
这是启动主应用程序时的错误消息:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-02-13 15:42:48.627 ERROR 22276 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.context.ApplicationContextException: Failed to start bean 'outputBindingLifecycle'; nested exception is java.lang.IllegalArgumentException: A default binder has been requested, but there is no binder available
我想在本地或针对我的 GCP 项目 运行 此代码。怎么办?
spring-cloud-gcp-starter-pubsub
不会为您带来活页夹依赖。
您还需要使用 spring-cloud-gcp-pubsub-stream-binder
:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-pubsub</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-pubsub-stream-binder</artifactId>
</dependency>
有关详细信息,请参阅项目中的示例:https://github.com/spring-cloud/spring-cloud-gcp/tree/master/spring-cloud-gcp-samples
我正在尝试使用 GCP 的 Pub Sum 作为活页夹在本地 运行 一个 SCS 应用程序。
钾
米
嗯嗯。嗯org.sm.Mpringframework.cloudkki
spring-cloud-gcp-starter-pubsub
米
这是配置l
@Configu@Configukration
@EnableBindingkklk(Source.class)
public class TimerSourcek {
@Bean
@InboundChannelAdapter(channel = "channel", poller = @Poller(fixedDelay = "1000", maxMessagesPerPoll = "1"))
public MessageSource<String> timerMessageSource() {
return () -> new GenericMessage<>(new SimpleDateFormat("HH:mm:ss").format(new Date()));
}
}
这是启动主应用程序时的错误消息:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-02-13 15:42:48.627 ERROR 22276 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.context.ApplicationContextException: Failed to start bean 'outputBindingLifecycle'; nested exception is java.lang.IllegalArgumentException: A default binder has been requested, but there is no binder available
我想在本地或针对我的 GCP 项目 运行 此代码。怎么办?
spring-cloud-gcp-starter-pubsub
不会为您带来活页夹依赖。
您还需要使用 spring-cloud-gcp-pubsub-stream-binder
:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-pubsub</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-pubsub-stream-binder</artifactId>
</dependency>
有关详细信息,请参阅项目中的示例:https://github.com/spring-cloud/spring-cloud-gcp/tree/master/spring-cloud-gcp-samples