-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
@Autowired/@Value does not work on inner bean in native #29803
Comments
I can indeed reproduce the issue. |
@bclozel cc @wilkinsona If I upgrade the repro to Spring Boot
I am wondering if |
We definitely need to do something in Boot.
We then get back to the original failure:
It would certainly be nice if Framework could support this arrangement but I don't know if that's possible. The code that's generated in Could you please explore what's possible on the Framework side when the exclude filter's in place? That will hopefully allow us to figure out if we just need the exclusion built into Boot, and Framework can tackle the rest of the problem, or if we need more extensive changes in Boot. |
Thanks, @jhoeller. With Framework 6.0.7 snapshots and the exclude filter described above the problem no longer occurs. I've opened spring-projects/spring-boot#34563 so that Boot takes care of the exclusion automatically. |
Thank you all for the work!! |
when using
@Value
or@Autowired
inside a@Webfilter
annotationed class and run in aot mode, it'll raise errorspring boot version 3.0.1
example project here
demo.zip
seems in
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#obtainInstanceFromSupplier
inner beans can't be found by beanName, but WebFilterHandler uses inner bean to create filter.
The text was updated successfully, but these errors were encountered: