-
Notifications
You must be signed in to change notification settings - Fork 38.4k
BeanRegistrar that is BeanFactoryAware fails in native image #34559
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
Comments
The current As a consequence, I am superseding this issue with #34562 which will remove support for @dsyer I am interested into learning more about the use cases you have for using a |
I was just using it to keep track of which beans were registered during the callback phase in the registry. I wasn't going to call |
The thing is that not very implementer of |
My code was just a stupid demo. But I can imagine you might want to check if there are already beans of a certain type, or with a certain name, before you do something in the registrar. |
I can understand that need, but it is not obvious how we can support that at Spring Framework level in a reliable way due to ordering and lifecyle constraints, and |
I'm not sure that would be flexible enough. An API in the registry would be much better IMO - it has to be there because it's half way between the registrar (too coarse grained) and the spec (too late to make the decision). |
See #21497 (comment), I target additional methods in |
The
BeanFactory
is not injected (but it is when you run the app in JVM with or without AOT processing).The text was updated successfully, but these errors were encountered: