【发布时间】:2020-08-05 17:59:16
【问题描述】:
停止 SpringBoot 应用程序时,可以看到如下所示的 INFO 日志消息。 那个阶段编号是从哪里来的?
o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 2147483647
【问题讨论】:
标签: spring-boot spring-framework-beans
停止 SpringBoot 应用程序时,可以看到如下所示的 INFO 日志消息。 那个阶段编号是从哪里来的?
o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 2147483647
【问题讨论】:
标签: spring-boot spring-framework-beans
Spring Framework 在org.springframework.context.SmartLifecycle 接口中默认将该值设置为2147483647
int DEFAULT_PHASE = Integer.MAX_VALUE;
验证:
jshell> Integer.MAX_VALUE
$1 ==> 2147483647
【讨论】: