【发布时间】:2018-06-19 14:45:21
【问题描述】:
我在 Spring Boot 1.5.6.RELEASE 中使用 http-client 和 spring-rabbit,它工作正常。
在 Spring Boot 2.0.2.RELEASE 中,http-client 被排除在 spring-rabbit pom.xml 之外。
我不想手动添加http-client 并跟踪启动版本之间的版本。
spring-boot-starter-amqp-1.5.6.RELEASE:
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
</dependency>
spring-boot-starter-amqp-2.0.2.RELEASE:
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
<version>2.0.3.RELEASE</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>http-client</artifactId>
<groupId>com.rabbitmq</groupId>
</exclusion>
</exclusions>
</dependency>
为什么http-client 被排除在外,我可以在不定义版本的情况下包含它吗?版本是2.0.1.RELEASE,但它没有被提取为spring-rabbit 中的属性。
【问题讨论】:
-
我认为被
<dependency> <groupId>com.rabbitmq</groupId> <artifactId>amqp-client</artifactId> <version>5.1.2</version> <scope>compile</scope> </dependency>取代 -
amqp-client不一样。我正在使用org.springframework.amqp.rabbit.core.RabbitManagementTemplate,它依赖于com.rabbitmq.http.client.Client,所以我需要http-client。
标签: java spring maven spring-boot rabbitmq