finishRefresh:
刷新完成工作,包括初始化LifecycleProcessor,發佈刷新完成事件等
源碼:
protected void finishRefresh() {
// Initialize lifecycle processor for this context.
//初始化生命週期管理器LifecycleProcessor
initLifecycleProcessor();
// Propagate refresh to lifecycle processor first.
//啓動所有實現了Lifecycle接口的bean
getLifecycleProcessor().onRefresh();
// Publish the final event.
//發佈刷新完成事件
publishEvent(new ContextRefreshedEvent(this));
// Participate in LiveBeansView MBean, if active.
LiveBeansView.registerApplicationContext(this);
}