SpringBoot项目启动后自动停止了?

2023-11-23 10:32:45 浏览数 (1)

1 现象

代码语言:javascript复制
2023-11-22T09:05:13.361 08:00 DEBUG 17521 --- [           main] o.s.b.a.ApplicationAvailabilityBean      : Application availability state LivenessState changed to CORRECT
2023-11-22T09:05:13.362 08:00 DEBUG 17521 --- [           main] o.s.b.a.ApplicationAvailabilityBean      : Application availability state ReadinessState changed to ACCEPTING_TRAFFIC
2023-11-22T09:05:13.362 08:00  WARN 17521 --- [       Thread-5] c.a.nacos.common.notify.NotifyCenter     : [NotifyCenter] Start destroying Publisher
2023-11-22T09:05:13.362 08:00  WARN 17521 --- [       Thread-0] c.a.n.common.http.HttpClientBeanHolder   : [HttpClientBeanHolder] Start destroying common HttpClient
2023-11-22T09:05:13.362 08:00  WARN 17521 --- [       Thread-5] c.a.nacos.common.notify.NotifyCenter     : [NotifyCenter] Destruction of the end
2023-11-22T09:05:13.363 08:00  WARN 17521 --- [       Thread-0] c.a.n.common.http.HttpClientBeanHolder   : [HttpClientBeanHolder] Destruction of the end
2023-11-22T09:05:13.363 08:00 DEBUG 17521 --- [ionShutdownHook] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@4044fb95, started on Wed Nov 22 09:05:12 CST 2023
2023-11-22T09:05:13.363 08:00 DEBUG 17521 --- [ionShutdownHook] o.s.c.support.DefaultLifecycleProcessor  : Stopping beans in phase -2147483647
2023-11-22T09:05:13.363 08:00 DEBUG 17521 --- [ionShutdownHook] o.s.c.support.DefaultLifecycleProcessor  : Bean 'springBootLoggingLifecycle' completed its stop procedure
2023-11-22T09:05:13.364 08:00 DEBUG 17521 --- [ionShutdownHook] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

2 解决方案

pom.xml加入:

代码语言:javascript复制
<dependency>
    <groupId> org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

0 人点赞