List of usage examples for org.springframework.beans.factory.config ConfigurableListableBeanFactory getTempClassLoader
@Nullable ClassLoader getTempClassLoader();
From source file:org.springframework.context.support.AbstractApplicationContext.java
/** * Instantiate and invoke all registered BeanFactoryPostProcessor beans, * respecting explicit order if given.//from www . j a va 2 s . c o m * <p>Must be called before singleton instantiation. */ protected void invokeBeanFactoryPostProcessors(ConfigurableListableBeanFactory beanFactory) { PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(beanFactory, getBeanFactoryPostProcessors()); // Detect a LoadTimeWeaver and prepare for weaving, if found in the meantime // (e.g. through an @Bean method registered by ConfigurationClassPostProcessor) if (beanFactory.getTempClassLoader() == null && beanFactory.containsBean(LOAD_TIME_WEAVER_BEAN_NAME)) { beanFactory.addBeanPostProcessor(new LoadTimeWeaverAwareProcessor(beanFactory)); beanFactory.setTempClassLoader(new ContextTypeMatchClassLoader(beanFactory.getBeanClassLoader())); } }