You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve support for @Configuration class hierarchies [SPR-8187] #12838
in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
It is not currently defined what will happen if all three of these classes are scanned.
Currently the container will parse each @Configuration class and register bean definitions as each are encountered. This means that the DataSource @Bean will be registered three times, and may not be registered in the correct order (e.g. the base class abstract method could be the last encountered and thus the one to override the previous two definitions.
The container should have awareness of @Configuration class hierarchies, and parse/register only the most specific/narrow base class.
Of course, in cases where there are sibling subclasses (same level in the inheritance tree), registration (and overrides) will occur on an as-scanned (or as-registered) basis.
This doesn't seem to be an issue (anymore) since we're excluding abstract classes from component scanning anyway and have stronger ordering mechanisms now.
in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
Activity
spring-projects-issues commentedon Sep 9, 2015
Juergen Hoeller commented
This doesn't seem to be an issue (anymore) since we're excluding abstract classes from component scanning anyway and have stronger ordering mechanisms now.
Juergen