spring源码版本5.0.5 Spring容器创建之后,会调用它的refresh方法刷新Spring应用的上下文. 首先整体查看AbstractApplicationContext#refresh源码 public void refresh() throws BeansException, IllegalStateException { synchronized (this.startupShutdownMonitor) { //刷新前的预处理; prepareRefresh(); //获取B…