當前位置:生活全書館 >

綜合知識

> springboot啟動流程

springboot啟動流程

springboot啟動流程

當我們執行Springapplication的main方法時,呼叫靜態方法run()首先是例項化,SpringApplication初始化的時候主要做主要做三件事:

1、根據classpath下是否存在(ConfigurablewebApplicationContext)判斷是否要啟動一個web applicationContext。

2、SpringFactoriesInstances載入classpath下所有可用的ApplicationContextInitializer

3、SpringFactoriesInstances載入classpath下所有可用的ApplicationListener

標籤: springboot 流程
  • 文章版權屬於文章作者所有,轉載請註明 https://shqsg.com/zonghezhishi/z292eo.html