Closed
Description
Dave Syer opened SPR-17063 and commented
I encountered a nasty problem with some functional bean registrations, caused by early an instantiation cascade driven from a BeanFactoryPostProcessor
in Spring Data. The issue comes back to the BFPP wanting to find bean definitions of a certain type, so it uses BeanFactory.getType(String)
, which could have used the ResolvableType
information that was available for the functional bean definition, but didn't and fell back to instantiating the bean to check its runtime concrete type. The offending code is in AbstractBeanFactory
.
Issue Links:
- Support for null bean in functional bean registration [SPR-17057] #21595 Support for null bean in functional bean registration
- Publicly expose ResolvableType in RootBeanDefinition [SPR-17028] #21566 Publicly expose ResolvableType in RootBeanDefinition
Referenced from: commits 52d124d