Skip to content

spring-rabbit-test: rabbitListenerAnnotationProcessor has already been defined #914

Closed
@liias

Description

@liias

I am using:
spring boot 2.1.2.RELEASE
spring-rabbit-2.1.3.RELEASE
spring-rabbit-test-2.1.3.RELEASE

When running tests I get an error:

The bean 'org.springframework.amqp.rabbit.config.internalRabbitListenerAnnotationProcessor', defined in class path resource [org/springframework/amqp/rabbit/test/RabbitListenerTestBootstrap.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/amqp/rabbit/annotation/RabbitBootstrapConfiguration.class] and overriding is disabled.

Spring suggests to use "spring.main.allow-bean-definition-overriding=true" to override the default behaviour and it does work. However, I find it a bit bad solution to change global spring configuration.

There is also possibility that I am doing something wrong.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions