You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use available type information in functional bean definitions for resolving FactoryBean type [SPR-17063] #21601
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.
AbstractBeanFactory.getType checks RootBeanDefinition.getTargetType() in its regular code path... Did it not end up there for some reason, or was the Class based type information not sufficient for that particular type check attempt?
That wasn't working. I think because it is a FactoryBean (makes sense given the Spring Data context - it was looking at LocalEntityManagerFactoryBean).
Activity
spring-projects-issues commentedon Jul 19, 2018
Juergen Hoeller commented
AbstractBeanFactory.getTypechecksRootBeanDefinition.getTargetType()in its regular code path... Did it not end up there for some reason, or was theClassbased type information not sufficient for that particular type check attempt?spring-projects-issues commentedon Jul 19, 2018
Dave Syer commented
That wasn't working. I think because it is a
FactoryBean(makes sense given the Spring Data context - it was looking atLocalEntityManagerFactoryBean).