I am trying to deploy the springboot application in Pivotal Cloud Foundry. I am getting following exception.

Caused by: org.springframework.cloud.CloudException: No unique service matching interface org.springframework.amqp.rabbit.connection.ConnectionFactory found. Expected 1, found 0

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.amqp.rabbit.connection.ConnectionFactory]: Factory method 'rabbitConnectionFactory' threw exception; nested exception is org.springframework.cloud.CloudException: No unique service matching interface org.springframework.amqp.rabbit.connection.ConnectionFactory found. Expected 1, found 0

1

There are 1 answers

0
user2239251 On

Try adding spring-cloud-services-starter-service-registry maven dependency.

<dependency>
   <groupId>io.pivotal.spring.cloud</groupId>
   <artifactId>spring-cloud-services-starter-service-registry</artifactId>
   <version>3.1.5.RELEASE</version>
</dependency>