spring 循环引用流程
2021-07-25 16:59:42 0 举报
登录查看完整内容
spring 循环引用流程
作者其他创作
大纲/内容
返回beanA的原始对象
由于第一步添加了缓存,所以这里不为null,并将三级缓存移到了二级
尝试从各级缓存获取bean
getObjectForBean(...)
getSingleton(beanA)
getSingleton(beanB)==null
beanB获取beanA的早期引用
getSingleton(beanA)==null
创建bean对象
开始创建bean实例
beanB完成实例化和初始化
doGetBean(beanA)
doGetBean(beanB)
添加到三级缓存
getBean(beanA)
最后完成beanA的实例化
![ORM架构设计(mybatis)](https://www.processon.com/chart_image/template/thumb/60ffca841e085366ea530f30.png?tid=60ffca841e085366ea530f2e)
收藏
![spring 循环引用流程](https://www.processon.com/chart_image/template/thumb/60fd14860e3e7423a3282b9f.png?tid=60fd14860e3e7423a3282b9a)
收藏
0 条评论
回复 删除
下一页