Java Architecture Diary
Jun 23, 2020 · Backend Development
Fixing @RefreshScope Conflict with @ConditionalOnSingleCandidate in Spring Boot
In Spring Cloud projects, adding @RefreshScope to a custom RabbitMQ ConnectionFactory can clash with @ConditionalOnSingleCandidate, preventing RabbitTemplate from being auto‑wired; this article explains the root cause, demonstrates how to diagnose the issue, and provides a solution to avoid such bean conflicts.
Bean InjectionConditionalOnSingleCandidateRabbitMQ
0 likes · 5 min read