springboot 2.3 启动流程
2025-12-12 08:44:44 0 举报
启动流程图
作者其他创作
大纲/内容
初始化SpringBootExceptionReporter类型实例
stopWatch.start
配置环境prepareEnvironmentConfigurableEnvironment(configureProfiles)
new SpringApplication
确定web应用类型WebApplicationType.deduceFromClasspath
refreshContext
createApplicationContext
设置java.awt.headless值true false
BeanDefinitionLoader
afterRefresh(目前啥都不做)
推导主程序类deduceMainApplicationClass
logStartupProfileInfo
发布ApplicationReadyEvent事件
listeners.starting发布ApplicationStartingEvent事件
listeners.running
发布ContextRefreshedEvent事件
registerShutdownHook
Y
prepareContext
logStartupInfo
getRunListeners
发布AvailabilityChangeEvent事件,状态为ReadinessState.ACCEPTING_TRAFFIC
发布ContextClosedEvent事件
listeners.started
打印启动所用时间logStarted
发布ApplicationEnvironmentPreparedEvent事件
loadFactoryNames(加载所有META-INF/spring.factories)
结束
发布ApplicationStartedEvent事件
初始化ApplicationListener类型实例
发布AvailabilityChangeEvent事件,状态为LivenessState.CORRECT
初始化ApplicationContextInitializer类型实例
启动SpringApplication.run
N
stopWatch.stop
contextLoaded广播ApplicationPreparedEvent事件
发布ApplicationContextInitializedEvent事件
callRunners
printBanner
收藏
收藏
0 条评论
下一页