Closed
Description
when using @Value
or @Autowired
inside a @Webfilter
annotationed class and run in aot mode, it'll raise error
***************************
APPLICATION FAILED TO START
***************************
Description:
A component required a bean named '(inner bean)#5884a914' that could not be found.
Action:
Consider defining a bean named '(inner bean)#5884a914' in your configuration.
spring boot version 3.0.1
example project here
demo.zip
seems in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#obtainInstanceFromSupplier
if (supplier instanceof InstanceSupplier<?> instanceSupplier) {
return instanceSupplier.get(RegisteredBean.of((ConfigurableListableBeanFactory) this, beanName));
}
inner beans can't be found by beanName, but WebFilterHandler uses inner bean to create filter.