在spring初始化的流程中,会发送一个容器刷新事件,这个事件,也是一个扩展点之一
先来看下发送刷新事件的源码
org.springframework.context.support.AbstractApplicationContext#refresh
org.springframework.context.support.AbstractApplicationContext#finishRefresh
从这个方法的注释中,就可以知道这个方法是干什么的
/**
* Finish the refresh of this context, invoking the LifecycleProcessor's
* onRefresh() method and publishing the
* {@link org.springframework.context.event.ContextRefreshedEvent}.
*/
protected void finishRefresh()