|
|
@ -1443,7 +1443,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* !!!!!!!!!!!!!!!!!!!!!
|
|
|
|
* !!!!!!!!!!!!!!!!!!!!!
|
|
|
|
* 对配置了 lazy-init属性为true的bean 进行预实例化
|
|
|
|
* 对配置了 lazy-init属性 为 false 的 bean 进行预实例化
|
|
|
|
* !!!!!!!!!!!!!!!!!!!!!
|
|
|
|
* !!!!!!!!!!!!!!!!!!!!!
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
finishBeanFactoryInitialization(beanFactory);
|
|
|
|
finishBeanFactoryInitialization(beanFactory);
|
|
|
@ -1465,7 +1465,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 对配置了 lazy-init属性为true的bean 进行预实例化
|
|
|
|
* 对配置了 lazy-init属性 为 false 的 bean 进行预实例化
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
protected void finishBeanFactoryInitialization(ConfigurableListableBeanFactory beanFactory) {
|
|
|
|
protected void finishBeanFactoryInitialization(ConfigurableListableBeanFactory beanFactory) {
|
|
|
|
// 这是 Spring3 以后新加的代码,为容器指定一个转换服务 (ConversionService)
|
|
|
|
// 这是 Spring3 以后新加的代码,为容器指定一个转换服务 (ConversionService)
|
|
|
@ -1492,7 +1492,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
|
|
|
// 缓存容器中所有注册的 BeanDefinition 元数据,以防被修改
|
|
|
|
// 缓存容器中所有注册的 BeanDefinition 元数据,以防被修改
|
|
|
|
beanFactory.freezeConfiguration();
|
|
|
|
beanFactory.freezeConfiguration();
|
|
|
|
|
|
|
|
|
|
|
|
// 对配置了 lazy-init属性 的 单例bean 进行预实例化处理
|
|
|
|
// 对配置了 lazy-init属性 为 false 的 单例bean 进行预实例化处理
|
|
|
|
beanFactory.preInstantiateSingletons();
|
|
|
|
beanFactory.preInstantiateSingletons();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|