查看全部
// Last step: publish corresponding event.
finishRefresh();
- 初始化生命周期处理器,如果有id为lifecycleProcessor的bean,则获取并赋值;否则使用默认的
// Initialize lifecycle processor for this context.
initLifecycleProcessor();
- 刷新生命周期处理器,获取刚刚的生命周期处理器,执行onRefresh
// Propagate refresh to lifecycle processor first.
getLifecycleProcessor().onRefresh();
- 发布ContextRefreshedEvent(容器刷新完毕事件)
// Publish the final event.
publishEvent(new ContextRefreshedEvent(this));
- 注册容器
// Participate in LiveBeansView MBean, if active.
LiveBeansView.registerApplicationContext(this);
网友评论