-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Overview
In DefaultListableBeanFactory::determinePrimaryCandidate(...)
, it is possible for multiple @Primary
beans to be resolved.
If the calling code ignores the NoUniqueBeanDefinitionException
(I'm unsure if I can make a simple reproduction of this easily), the oversight can be hidden to the developer.
Could a log mirroring the exception message be included?
I'm unsure what Log Level would be best, but it would be useful.
Spring Framework 6.2.11
Before writing this, I checked the debugging experience by setting logging.level.org.springframework.beans: trace
and setting a break point in the @Bean
declaration.
That was not enough information to see why a specific bean was resolving, hence the request here.
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement