当前位置:生活全书馆 >

综合知识

> springboot启动流程

springboot启动流程

springboot启动流程

当我们运行Springapplication的main方法时,调用静态方法run()首先是实例化,SpringApplication初始化的时候主要做主要做三件事:

1、根据classpath下是否存在(ConfigurablewebApplicationContext)判断是否要启动一个web applicationContext。

2、SpringFactoriesInstances加载classpath下所有可用的ApplicationContextInitializer

3、SpringFactoriesInstances加载classpath下所有可用的ApplicationListener

标签: springboot 流程
  • 文章版权属于文章作者所有,转载请注明 https://shqsg.com/zh-sg/zonghezhishi/z292eo.html