我需要哪些依赖关系才能使用RabbitConnectionFactory?我有以下pom,但RabbitConnectionFactory无法解决:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test.rabbit</groupId>
<artifactId>connector</artifactId>
<version>0.0.1-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.4.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-cloudfoundry-connector</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-spring-service-connector</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-cloudfoundry-connector</artifactId>
</dependency>
</dependencies>
我的回购在这里:https://github.com/pkid/rabbitconnectionfac
谢谢你提前提供帮助!
发布于 2017-07-07 12:32:25
没有这样的类RabbitConnectionFactory。
你在哪里看到一个错误?
对于spring-rabbit,您通常使用它的CachingConnetionFactory。它使用来自amqp库的底层ConnectionFactory,这是一个传递依赖关系.
spring-cloud-service-connector,在RabbitConnectionFactoryCreator中创建这些对象的实例。
https://stackoverflow.com/questions/44970118
复制相似问题