feat(youlai-laboratory-spring): 完善createBean流程图

完善createBean流程图
This commit is contained in:
zc 2022-04-01 22:51:09 +08:00
parent 832e103fff
commit f0202cb5a3

View File

@ -9,17 +9,35 @@ header 有来 Spring bean的创建过程
actor 客户端
客户端->AbstractBeanFactory:createBean
AbstractBeanFactory->AbstractBeanFactory:开始创建bean\ndoCreateBean
AbstractBeanFactory->AbstractBeanFactory:bena实例化\ncreateBeanInstance
AbstractBeanFactory->AbstractBeanFactory:执行beanDefinition的后置处理器\napplyMergedBeanDefinitionPostProcessors
AbstractBeanFactory->AbstractBeanFactory:属性填充\npopulateBean
AbstractBeanFactory->AbstractAutowireCapableBeanFactory:开始初始化\ninitializeBean
客户端->AbstractBeanFactory:getBean
AbstractBeanFactory->AbstractAutowireCapableBeanFactory:开始创建bean\ncreateBean
AbstractAutowireCapableBeanFactory->AbstractAutowireCapableBeanFactory:开始创建bean\ndoCreateBean
AbstractAutowireCapableBeanFactory->AbstractAutowireCapableBeanFactory:开始实例化\ncreateBeanInstance
AbstractAutowireCapableBeanFactory->AbstractBeanFactory:加载类\nresolveBeanClass
AbstractBeanFactory->AbstractAutowireCapableBeanFactory:\n返回beanClass
AbstractAutowireCapableBeanFactory->AbstractAutowireCapableBeanFactory:如果满足循环依赖条件则加入三级缓存\naddSingletonFactory
AbstractAutowireCapableBeanFactory->AbstractAutowireCapableBeanFactory:推断构造器\ndetermineConstructorsFromBeanPostProcessors
AbstractAutowireCapableBeanFactory->AbstractAutowireCapableBeanFactory:实例化bean并封装成beanWrapper\ninstantiateBean
AbstractAutowireCapableBeanFactory->AbstractAutowireCapableBeanFactory:执行beanDefinition的后置处理器\napplyMergedBeanDefinitionPostProcessors
AbstractAutowireCapableBeanFactory->AbstractAutowireCapableBeanFactory:属性填充\npopulateBean
AbstractAutowireCapableBeanFactory->AbstractAutowireCapableBeanFactory:开始初始化\ninitializeBean
AbstractAutowireCapableBeanFactory->AbstractAutowireCapableBeanFactory:执行Aware\ninvokeAwareMethods
AbstractAutowireCapableBeanFactory->AbstractAutowireCapableBeanFactory:初始化前\napplyBeanPostProcessorsBeforeInitialization
AbstractAutowireCapableBeanFactory->AbstractAutowireCapableBeanFactory:初始化\ninvokeInitMethods
AbstractAutowireCapableBeanFactory->AbstractAutowireCapableBeanFactory:初始后\napplyBeanPostProcessorsAfterInitialization
AbstractAutowireCapableBeanFactory->AbstractBeanFactory:wrappedBean
AbstractAutowireCapableBeanFactory->AbstractAutowireCapableBeanFactory:初始后\nsingletonObject
AbstractAutowireCapableBeanFactory->DefaultSingletonBeanRegistry:\nexposedObject
DefaultSingletonBeanRegistry->DefaultSingletonBeanRegistry:注册bean\naddSingleton
DefaultSingletonBeanRegistry->AbstractBeanFactory: sharedInstance
AbstractBeanFactory->AbstractBeanFactory:获取给定bean的实例对象\ngetObjectForBeanInstance
AbstractBeanFactory->AbstractBeanFactory:转换bean类型\nadaptBeanInstance
AbstractBeanFactory->客户端:\nbean
@enduml