spring getBean源码调用大致流程

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Aqu415/article/details/78441472

大致调用流程

以配置文件的方式为例:

org.springframework.context.support.AbstractApplicationContext.getBean(String)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(String)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(String, Class<T>, Object[], boolean)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(String, RootBeanDefinition, Object[])
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(String, RootBeanDefinition, Object[])
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(String, RootBeanDefinition, Object[])


属性注入:

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(String, BeanDefinition, BeanWrapper, PropertyValues)


猜你喜欢

转载自blog.csdn.net/Aqu415/article/details/78441472