【记录】springboot集成kafka消费者启动报错Type org.springframework.kafka.listener.RecordInterceptor not present

时间:2024-02-16 19:27:16

问题如图

 

 

Kafka版本为kafka_2.11-2.1.1,springboot版本为2.3.4.RELEASE

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.3.4.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>
spring-kafka版本为2.2.2.RELEASE
<dependency>
    <groupId>org.springframework.kafka</groupId>
    <artifactId>spring-kafka</artifactId>
    <version>2.2.2.RELEASE</version>
</dependency>

 

把spring-kafka版本修改为2.3.4.RELEASE就可以了