spring bean生命周期
2020-12-07 13:57:55 0 举报
spring bean生命周器
作者其他创作
大纲/内容
InstantiationAwareBeanPostProcessor.postProcessPropertyValues例子RequiredAnnotationBeanPostProcessor @Required必须要注入该属性
InstantiationAwareBeanPostProcessor.postProcessProperties 例子AutowiredAnnotationBeanPostProcessorCommonAnnotationBeanPostProcessor注入Autowired Resource Inject属性
实例化
BeanFactoryPostProcessor.postProcessBeanFactory
BeanPostProcessor.postProcessBeforeInitialization例子ApplicationContextAwareProcessorinvokeAwareInterfaces(bean)EnvironmentAwareEmbeddedValueResolverAwareResourceLoaderAwareApplicationEventPublisherAwareMessageSourceAwareApplicationContextAware 例子FrameworkServlet例子InitDestroyAnnotationBeanPostProcessor LifecycleMetadata.invokeInitMethods
使用bean
实例化bean span style=\"font-size: inherit;\
spring bean生命周期结束
AbstractApplicationContext.closedoClosedestroyBeansDefaultListableBeanFactory.destroySingletonsdestroySingletondestroyBeanDisposableBean.destroy例子DisposableBeanAdapter implements DisposableBeana InitDestroyAnnotationBeanPostProcessor.postProcessBeforeDestructionb ((DisposableBean) this.bean).destroy()c invokeCustomDestroyMethod(this.destroyMethod)
spring bean生命周期开始
MergedBeanDefinitionPostProcessor.postProcessMergedBeanDefinition例子AutowiredAnnotationBeanPostProcessor读取Antowire/Value注解
销毁
赋值
BeanPostProcessor.postProcessAfterInitialization
初始化
代理
初始化bean span style=\"font-size: inherit;\
BeanDefinitionRegistryPostProcessor.postProcessBeanDefinitionRegistry例子ConfigurationClassPostProcessor解析配置类,执行扫描注解,加载BeanDefinitions
收藏
0 条评论
下一页