spring-FactoryBean
2023-01-12 17:59:30 0 举报
spring FactoryBean
作者其他创作
大纲/内容
获取beangetBean
去除&符transformedBeanName
。。。
是
getObjectFromFactoryBean
创建beandoGetBean
doGetObjectFromFactoryBean
refresh()
返回
调用工厂bean的getObject()返回实例object = factory.getObject()
实例化所有non-lazy-init beanfinishBeanFactoryInitialization(beanFactory)
preInstantiateSingletons()
实例是否为工厂beanInstance instanceof FactoryBean
getObjectForBeanInstance
从缓存获取getSingleton(beanName)
beanFactory.preInstantiateSingletons()
返回bean
获取beangetBean(\"&\" + beanName)
是否有&符BeanFactoryUtils.isFactoryDereference(name)
是否工厂beanisFactoryBean(beanName)
AbstractBeanFactory#doGetBean
处理name去除&符String beanName =transformedBeanName(name)
0 条评论
下一页