Skip to content

Consistent Environment access in XML bean definition parsing code [SPR-12248] #16862

@spring-projects-issues

Description

@spring-projects-issues

Juergen Hoeller opened SPR-12248 and commented

Dating back to the Spring 3.1 days, there is quite a bit of explicit passing around of Environment references in Spring's XML bean definition parsing code, e.g. in BeanDefinitionParserDelegate and DefaultBeanDefinitionDocumentReader. With the introduction of a convenient XmlReaderContext.getEnvironment() method, there is really no need for explicit Environment fields anymore.

This allows for deprecating BeanDefinitionDocumentReader.setEnvironment and BeanDefinitionParserDelegate(XmlReaderContext, Environment), as well as as undeprecating BeanDefinitionParserDelegate(XmlReaderContext). Some preparation measures are also going to be backported to 4.0.8 and 3.2.12, including a fully working version of the latter constructor.


Affects: 4.1 GA

Issue Links:

Referenced from: commits de3ea5d, 5ecdd8c, d46c3fc

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions