Avoid getTypeForFactoryBean warn logging for lazy-init beans

Issue: SPR-13833
master
Juergen Hoeller 9 years ago
parent 9bffb9e53f
commit 04f31816bd
  1. 7
      spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java

@ -1475,9 +1475,14 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
logger.debug("Bean currently in creation on FactoryBean type check: " + ex); 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 { else {
if (logger.isWarnEnabled()) { 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); onSuppressedException(ex);

Loading…
Cancel
Save