Merge branch '6.1.x'
# Conflicts: # spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java
This commit is contained in:
commit
7d236e29bb
|
@ -38,6 +38,7 @@ import org.springframework.beans.BeansException;
|
||||||
import org.springframework.beans.CachedIntrospectionResults;
|
import org.springframework.beans.CachedIntrospectionResults;
|
||||||
import org.springframework.beans.factory.BeanFactory;
|
import org.springframework.beans.factory.BeanFactory;
|
||||||
import org.springframework.beans.factory.BeanFactoryInitializer;
|
import org.springframework.beans.factory.BeanFactoryInitializer;
|
||||||
|
import org.springframework.beans.factory.BeanNotOfRequiredTypeException;
|
||||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||||
import org.springframework.beans.factory.ObjectProvider;
|
import org.springframework.beans.factory.ObjectProvider;
|
||||||
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
|
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
|
||||||
|
@ -965,7 +966,15 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||||
// Initialize LoadTimeWeaverAware beans early to allow for registering their transformers early.
|
// Initialize LoadTimeWeaverAware beans early to allow for registering their transformers early.
|
||||||
String[] weaverAwareNames = beanFactory.getBeanNamesForType(LoadTimeWeaverAware.class, false, false);
|
String[] weaverAwareNames = beanFactory.getBeanNamesForType(LoadTimeWeaverAware.class, false, false);
|
||||||
for (String weaverAwareName : weaverAwareNames) {
|
for (String weaverAwareName : weaverAwareNames) {
|
||||||
beanFactory.getBean(weaverAwareName, LoadTimeWeaverAware.class);
|
try {
|
||||||
|
beanFactory.getBean(weaverAwareName, LoadTimeWeaverAware.class);
|
||||||
|
}
|
||||||
|
catch (BeanNotOfRequiredTypeException ex) {
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("Failed to initialize LoadTimeWeaverAware bean '" + weaverAwareName +
|
||||||
|
"' due to unexpected type mismatch: " + ex.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop using the temporary ClassLoader for type matching.
|
// Stop using the temporary ClassLoader for type matching.
|
||||||
|
|
Loading…
Reference in New Issue