Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
838 views
in Technique[技术] by (71.8m points)

spring-kafka - 添加Spring Kafka Maven依赖版本2.2.1.RELEASE遇到ClassNotFoundException(Adding Spring Kafka Maven dependency version 2.2.1.RELEASE encountered ClassNotFoundException)

I wanna use Kafka client in Spring boot.

(我想在春季启动中使用Kafka客户端。)
After reading the offical documentaion , I added the maven dependecy.

(阅读官方文档后 ,我添加了行家依赖。)
Then i tried to start Spring Boot.

(然后我尝试启动Spring Boot。)

It throws ClassNotFoundException .

(它抛出ClassNotFoundException 。)
This class is ' org.springframework.kafka.listener.RecordInterceptor '

(此类是“ org.springframework.kafka.listener.RecordInterceptor ”)

Could any one can solve this problem?

(谁能解决这个问题?)

   Version:
          <spring.boot.version>2.2.1.RELEASE</spring.boot.version>
          <spring.version>5.2.1.RELEASE</spring.version>
    pom.xml:
       <dependency>
                <groupId>org.springframework.kafka</groupId>
                <artifactId>spring-kafka</artifactId>
                <version>${spring.boot.version}</version>
       </dependency>
     <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
                <version>${spring.boot.version}</version>
      </dependency>
     <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-security</artifactId>
                <version>${spring.boot.version}</version>
     </dependency>

  ask by Kai Zhao translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...