Avoid getTypeForFactoryBean warn logging for lazy-init beans

Issue: SPR-13833
This commit is contained in:
Juergen Hoeller 2015-12-31 11:47:46 +01:00
parent 9bffb9e53f
commit 04f31816bd
1 changed files with 6 additions and 1 deletions

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);