mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-22 22:19:03 +00:00
getTypeForFactoryBean suppresses instantiation failures for non-singleton FactoryBeans
Issue: SPR-12786
(cherry picked from commit 9b25d6a)
This commit is contained in:
+8
@@ -897,6 +897,14 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
|
||||
instance = bw.getWrappedInstance();
|
||||
}
|
||||
}
|
||||
catch (BeanCreationException ex) {
|
||||
// Can only happen when getting a FactoryBean.
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Bean creation exception on non-singleton FactoryBean type check: " + ex);
|
||||
}
|
||||
onSuppressedException(ex);
|
||||
return null;
|
||||
}
|
||||
finally {
|
||||
// Finished partial creation of this bean.
|
||||
afterPrototypeCreation(beanName);
|
||||
|
||||
Reference in New Issue
Block a user