02_获取bean工厂
2020-01-09 本文已影响0人
steamed_bun
查看全部
// Tell the subclass to refresh the internal bean factory. ConfigurableListableBeanFactory beanFactory = obtainFreshBeanFactory();
- 刷新【创建】bean工厂
refreshBeanFactory();
- 只是给bean工厂设置了序列号
- 而beanFactory是
GenericApplicationContext
构造器中就创建好的this.beanFactory = new DefaultListableBeanFactory();
- 将上面的beanFactory返回出去
ConfigurableListableBeanFactory beanFactory = getBeanFactory();