2017-07-07 79 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中創建這些對象的實例。

相關問題