Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for Aware interfaces in BeanRegistrar #34562

Closed
sdeleuze opened this issue Mar 10, 2025 · 0 comments
Closed

Remove support for Aware interfaces in BeanRegistrar #34562

sdeleuze opened this issue Mar 10, 2025 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@sdeleuze
Copy link
Contributor

As reported in #34559, it is currently possible to implement BeanClassLoaderAware, BeanFactoryAware, EnvironmentAware and ResourceLoaderAware 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 in BeanRegistrat#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.

@sdeleuze sdeleuze self-assigned this Mar 10, 2025
@sdeleuze sdeleuze added this to the 7.0.0-M3 milestone Mar 10, 2025
@sdeleuze sdeleuze added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement labels Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant