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
Preserve 'reader' attribute in @ImportResource hierarchies [SPR-6327] #10993
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
Problem: the XML file specified in ConfigA will be read by the PropertiesBeanDefinitionReader declared in ConfigB, which naturally fails.
Cause: when parsing annotations from the @Configuration class hierarchy, the last reader attribute wins, effectively overriding any other reader attributes from classes up the hierarchy.
Solution: crawl the class/annotation hierarchy manually and build up a context containing every resource and its associated BeanDefinitionReader type, analogous to the support for loader in @ContextConfiguration in the Spring TestContext Framework (TCF).
This is similar in concept to the way that TCF operates. In this way, this improvement will make sense to implement alongside #10976, which deals with support for relative paths and import-by-convention semantics -- features that are also supported by TCF.
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 Nov 10, 2009
Chris Beams commented
See TODO in
@Ignoredtest for this feature with inImportResourceTests.testImportDifferentResourceTypes().