>> 建立DefaultListableBeanFactory --> loadBeanDefinitions
app
1)BeanDefinitionRegistryPostProcessor.postProcessBeanDefinitionRegistry(編碼註冊)post
2)BeanDefinitionRegistryPostProcessor.postProcessBeanDefinitionRegistry(配置註冊):PriorityOrdered排序 --> Ordered排序 --> 無序編碼
3)BeanFactoryPostProcessor.postProcessBeanFactory(編碼註冊):BeanDefinitionRegistryPostProcessor --> BeanFactoryPostProcessorspa
4)BeanFactoryPostProcessor.postProcessBeanFactory(配置註冊):PriorityOrdered排序 --> Ordered排序 --> 無序排序
1)PriorityOrdered排序 --> Ordered排序 --> 無序it
2)MergedBeanDefinitionPostProcessorio
1)InstantiationAwareBeanPostProcessor.applyBeanPostProcessorsBeforeInstantiation(resolveBeforeInstantiation)table
>> 獲取bean --> 6class
>> createBeanInstance(默認:CglibSubclassingInstantiationStrategy.instantiate) --> 2容器
2)MergedBeanDefinitionPostProcessor.postProcessMergedBeanDefinitioInstantiationAwareBeanPostProcessor
3)InstantiationAwareBeanPostProcessor.postProcessAfterInstantiation
>> autowireByName / autowireByType
4)InstantiationAwareBeanPostProcessor.postProcessPropertyValues
>> applyPropertyValues
5)BeanPostProcessor.postProcessBeforeInitialization(@postConstruct)
>> InitializingBean.afterPropertiesSet --> invokeInitMethod(init-method )
6)BeanPostProcessor.postProcessAfterInitialization
>> 單實例(容器初始化完成):SmartInitializingSingleton.afterSingletonsInstantiated
1)BeanFactoryPostProcessor
2)BeanPostProcessor:ApplicationContextAwareProcessor、InitDestroyAnnotationBeanPostProcessor、AutowiredAnnotationBeanPostProcessor、AOP