weylanshi / blogtalk

博客评论
0 stars 0 forks source link

重学spring(三) Spring IOC 源码分析--获取单例Bean - 小石头记 #97

Open weylanshi opened 1 year ago

weylanshi commented 1 year ago

https://www.weypage.com/2020/05/13/Java%E6%A1%86%E6%9E%B6/spring/IOC/%E8%8E%B7%E5%8F%96%E5%8D%95%E4%BE%8Bbean%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90/

简介上一篇文章演演示了Bean的生命周期,我们从容器中获取bean使用一般是 ctx.getBean("xxx"),但这个这个方法具体做了哪些事情我们并不知道,在这篇文章我将详细分析getBean("xxx")方法实现细节,代码比较长,分析不到位的地方,请见谅。 源码分析入口getBean(String)源码ctx.getBean("xxx&quo