且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用 spring-boot:1.5.1 和 spring-cloud-stream 时无法启动 bean 'inputBindingLifecycle'

更新时间:2022-02-24 17:15:51

这是Chelsea.M1 版本的 binder 和 Spring Initializr 之间的不一致——Kafka binder starter 需要 0.9 依赖集作为基线,但 Spring Boot 父级将 Spring Kafka 依赖项覆盖到 1.1.2.由于 Spring Integration Kafka 不受 Spring Boot 管理,因此由 binder 拉入的版本 - 2.0.1 - 与 Spring Kafka 1.1.2 不兼容.

This is an inconsistency between the Chelsea.M1 release of the binder and Spring Initializr - the Kafka binder starter requires the 0.9 dependency set as a baseline, but the Spring Boot parent overrides the Spring Kafka dependency to 1.1.2. Since Spring Integration Kafka is not managed by Spring Boot, the version that's pulled in by the binder - 2.0.1 - is incompatible to Spring Kafka 1.1.2.

在这里跟踪:https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/88

更新:如果在 Initializr 中使用 Spring Boot 1.5.2.BUILD-SNAPSHOT 及更高版本,则应检索正确的依赖项集.请注意,需要 Kafka 0.10.1.x.

Update: If using version Spring Boot 1.5.2.BUILD-SNAPSHOT and later in Initializr, the proper dependency set should be retrieved. Note that a Kafka 0.10.1.x is required.