Avoid getTypeForFactoryBean warn logging for lazy-init beans

Issue: SPR-13833
(cherry picked from commit 04f3181)
This commit is contained in:
Juergen Hoeller
2015-12-31 11:47:46 +01:00
parent 24e58c1ac3
commit 84e5234eb5

View File

@@ -1475,9 +1475,14 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
logger.debug("Bean currently in creation on FactoryBean type check: " + ex);
}
}
else if (mbd.isLazyInit()) {
if (logger.isDebugEnabled()) {
logger.debug("Bean creation exception on lazy FactoryBean type check: " + ex);
}
}
else {
if (logger.isWarnEnabled()) {
logger.warn("Bean creation exception on FactoryBean type check: " + ex);
logger.warn("Bean creation exception on non-lazy FactoryBean type check: " + ex);
}
}
onSuppressedException(ex);