天天看點

java.lang.ClassNotFoundException: org.springframework.kafka.listener.AfterRollbackProcessor

Spring for Apache Kafka 2.0.x is not compatible with Spring Boot 2.1.x. You have to use Spring-Kafka 2.2.x. More over would be better to just rely on the dependency from Spring Boot per se. please, see https://start.spring.io/

for more info how properly start the project for Spring Boot.

And please, don’t duplicate your question in different places if that was not asked.

在org.springframework.kafka,因為我們使用的springboot 版本是2.1.5.RELEASE,是以版本存在差異化,是以我們修改版本為:

<!-- kafka 依賴 -->
  <dependency>
      <groupId>org.springframework.kafka</groupId>
      <artifactId>spring-kafka</artifactId>
      <version>2.2.8.RELEASE</version>
  </dependency>