解決:Dependency 'org.springframework.boot:spring-boot-starter-amqp:2.2.7.RELEASE' not found

問題:

在一個Spring Boot項目 中集成 RabbitMQ,添加依賴時報錯:

  • Dependency 'org.springframework.boot:spring-boot-starter-amqp:2.2.7.RELEASE' not found

  • Failed to read artifact descriptor for org.springframework.boot:spring-boot-starter-amqp:jar:2.2.7.RELEASE

原因:

2.2.7.RELEASE 下沒有 spring-boot-starter-amqp。需要指定有amqp的springboot版本。(猜的)
 

解決:

<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-amqp -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-amqp</artifactId>
    <version>2.1.7.RELEASE</version>
</dependency>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章