我正试图在Pivotal Cloud Foundry中部署springboot应用程序。我得到以下异常。
由:org.springframework.cloud.CloudException引起:找不到与接口org.springfframework.amqp.rabbit.connection.ConnectionFactory匹配的唯一服务。应为1,找到0
由:org.springframework.beans.BeanInstanceException引起:未能实例化[org.springfframework.amqp.rabbit.connection.ConnectionFactory]:工厂方法"rabbitConnectionFactory"引发异常;嵌套异常为org.springframework.cloud.CloudException:找不到与接口org.springfframework.amqp.rabbit.connection.ConnectionFactory匹配的唯一服务。应为1,找到0
尝试添加spring-cloud-services-starter-serviceregistrymaven依赖项。
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
<artifactId>spring-cloud-services-starter-service-registry</artifactId>
<version>3.1.5.RELEASE</version>
</dependency>