0

I am upgrading a Spring Cloud Stream application from Spring Boot 2.7.6 to 3.0.0 So far, I had to change only some code to get the project compiled

  • KafkaHeaders.MESSAGE_KEY to KafkaHeaders.KEY
  • KafkaTestUtils.getSingleRecord() needs now a Duration as the 3rd parameter instead of long

But when starting the application the autowiring of org.springframework.cloud.stream.endpoint.BindingsEndpoint doesn't work anymore:

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.cloud.stream.endpoint.BindingsEndpoint' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

Is there a documentation, what has to be done, to get it working?

Here is my sample project. The main branch contains the working code with Spring Boot 2.7.6.

Brian Clozel
  • 56,583
  • 15
  • 167
  • 176
gira1
  • 117
  • 2
  • 10

1 Answers1

1

In your spring-boot-3 branch, I see this where you set Spring Cloud Stream to 3.2.6. You need to use a compatible 4.0.x version. Update that to 4.0.0-SNAPSHOT (or any 4.0.0 release), and the bindings endpoint should be available. I just verified that on my end with that change.

sobychacko
  • 5,099
  • 15
  • 26