简体   繁体   English

Spring-Kafka:RecordIntercepter class 未找到

[英]Spring-Kafka: RecordIntercepter class not found

I am using spring boot 2.1.5 and spring-kafka, version not specified.我正在使用 spring 启动 2.1.5 和 spring-kafka,版本未指定。 Project is gradle 6.0, java 1.8项目是 gradle 6.0,java 1.8

I am getting this error我收到此错误

error creating bean with name 'org.springframework.boot.autoconfigure.kafka.kafkaannotationdrivenconfiguration': unexpected exception during bean creation; nested exception is java.lang.typenotpresentexception: type org.springframework.kafka.listener.recordinterceptor not present

What could be this due to?这可能是什么原因? Please help.请帮忙。

2.1.5 is nearly a year old; 2.1.5快一年了; the current Boot 2.1.x release is 2.1.13.当前的 Boot 2.1.x 版本是 2.1.13。

2.1.5 uses spring-kafka 2.2.6 so I don't see how you can get that error, based on your description. 2.1.5 使用 spring-kafka 2.2.6,所以根据你的描述,我看不出你是如何得到这个错误的。

RecordInterceptor was added in spring-kafka 2.2.7.在 spring-kafka 2.2.7 中添加了RecordInterceptor

It was added to the Spring Boot autoconfiguration in 2.2.0 .它已添加到 2.2.0 中的 Spring 引导自动配置中

So what you are describing makes no sense;因此,您所描述的毫无意义; you must be using Boot 2.2.x and an old spring-kafka version.您必须使用 Boot 2.2.x 和旧的 spring-kafka 版本。

You have mis-matched Boot/Kafka versions.您的 Boot/Kafka 版本不匹配。

Upgrade to Boot 2.1.13 (or preferably 2.2.6).升级到 Boot 2.1.13(或者最好是 2.2.6)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM