2017-07-07 104 views
0

我需要哪些依赖项才能使用RabbitConnectionFactory?我有以下POM,但RabbitConnectionFactory不能得到解决:RabbitConnectionFactory maven dependency

<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

感谢您的帮助提前!

回答

1

有没有这样的类RabbitConnectionFactory

你在哪里看到错误?

随着spring-rabbit,你通常会使用它的CachingConnetionFactory。它使用来自amqp-client库的底层ConnectionFactory,这是一种传递依赖性。

spring-cloud-service-connector,在RabbitConnectionFactoryCreator中创建这些对象的实例。

相关问题