Remove support for Aware
interfaces in BeanRegistrar
#34562
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
As reported in #34559, it is currently possible to implement
BeanClassLoaderAware
,BeanFactoryAware
,EnvironmentAware
andResourceLoaderAware
interfaces with related injection in non AOT mode.It is not supposed to be supported, as it is too easy to shoot yourself in the foot with a
BeanFactory
for example with bean retrieval that is not supposed to be invoked inBeanRegistrat#register
. As a consequence, I am removing such capability, and am interested into learning about the higher level use cases to potentially address them in a different way.For example, I am planning to add additional capabilities to implement programmatic conditions via #21497. Feel free to comment on that issue and create a new one to explore additional needs.
The text was updated successfully, but these errors were encountered: