spring bean生命周期
2020-08-28 14:09:47 1 举报
spring bean生命周期总结
作者其他创作
大纲/内容
void setBeanName(String var1);
BeanPostProcessor的postProcessAfterInitialization
用户xml配置的init-method方法
用户开始使用bean
BeanPostProcessor的postProcessBeforeInitialization
void setBeanFactory(BeanFactory var1) throws BeansException;
调用xml配置的destory-method
void postProcessBeanFactory(ConfigurableListableBeanFactory var1) throws BeansException;
BeanNameAware的setBeanName
InstantiationAwareBeanPostProcessor的postProcessPropertyValues方法
bean属性注入
子类
InstantiationAwareBeanPostProcessor的postProcessBeforeInstantiation方法
BeanFactoryPostProcessor的postProcessBeanFactory方法
实例化bean
InitializingBean的afterPropertiesSet
调用DisposableBean的destroy
InstantiationAwareBeanPostProcessor的postProcessAfterInstantiation方法
void destroy() throws Exception;
void afterPropertiesSet() throws Exception;
BeanFactoryAware的setBeanFactory
0 条评论
回复 删除
下一页