1.springboot的启动流程

springboot启动的过程:
1.listeners.starting()
2.createEnvironment
3.createContext
4.context.setEnvironment(Environment)
5.ApplicationContextInitializer.initialize(context);

6.listeners.contextPrepared(context)
7.Load the sources

8.listeners.contextLoaded(context);
9.refresh(context)

10.listeners.finished(context, null);

说明:
listeners指的是SpringApplicationRunListeners

1.listeners.starting()作用:
2.createEnvironment作用:字面含义
3.createContext的作用:字面含义
4.context.setEnvironment(Environment)的作用:字面含义
5.ApplicationContextInitializer.initialize(context)的作用:准备环境的时候,为context增加beanPostProcessor
6.listeners.contextPrepared(context)的作用:
7.Load the sources的作用:
8.listeners.contextLoaded(context);的作用:
9.refresh(context)的作用:进入spring的流程
10.listeners.finished(context, null);的作用:

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容