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> 公众号-JavaEdge 认证博客专家 博客专家 慕课网认证作者 腾讯云+最佳作者 1.经历:19届双一流本科,曾在百度、携程、华为等大厂搬金砖2.涉猎领域:Java生态各种中间件原理、框架源码、微服务、中台等架构设计及落地实战,只生产硬核干货!3.开源社区荣誉:阿里云栖社区博客专家、腾讯云+社区2019年度最佳作者、慕课网认证作者、百万流量万粉博客专家,简书优秀创作者兼《程序员》专题管理员4.著作:在牛客网著有《Java源码面试解析指南》,目前已有上千人在学习,已助众多读者成功拿到满意offer~