spring beans
2021-07-01 15:24:45 0 举报
spring bean的uml图
作者其他创作
大纲/内容
this.doResolveDependency
metadata = findAutowiringMetadata
I:MergedBeanDefinitionPostProcessor
resolveDependency
applyBeanPostProcessorsBeforeInitialization
resolveCachedArguments
createDependencyProvider
populateBean给bean属性赋值
createOptionalDependency
把找到的bean返回给调用方,并且通过反射,并且将找到的Bean赋值给BeanWrapper的instance
applyBeanPostProcessorsAfterInitialization
applyMergedBeanDefinitionPostProcessors
type.isArray()
AutowiredMethodElement是AutowiredAnnotationBeanPostProcessor的内部私有类,继承了InjectionMetadata.InjectedElement
postProcessProperties
AbstractAutowireCapableBeanFactory
对每一个Beanpostprocessor均执行beanProcessor.postProcessBeforeInitialization
Collection.class.isAssignableFrom(type)
Lazy
doCreateBean
DefaultListableBeanFactory
initializeBean初始化bean
Provider
findAutowireCandidates
通过AutowiredAnnotationBeanPostProcessor内部的ConfigurableListableBeanFactory 调用
invokeInitMethods自定义的初始化方法
Normal
this.resolveMultipleBeans
getLazyResolutionProxyIfNecessary
Optional
createBean
resolveMethodArguments
postProcessMergedBeanDefinition方法,在类有父类的时候,将父类元信息(比如父类的字段)合并到类信息中,就是视频中superUser继承User
AutowiredAnnotationBeanPostProcessor
延迟加载的时候,通过这个来返回一个Bean的代理对象,当真正调用到bean方法时,才加载bean
Map.class == type
0 条评论
下一页