gpt4 book ai didi

spring-boot - 我的 spring-boot mvc 应用程序总是通过显示关闭

转载 作者:行者123 更新时间:2023-12-04 03:02:57 31 4
gpt4 key购买 nike

   .   ____          _            __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.6.RELEASE)


2017-09-03 16:43:53.881 INFO 6584 --- [ main] c.n.SpringBootMvcExampleApplication : Starting SpringBootMvcExampleApplication on lenovo-PC with PID 6584 (C:\Users\lenovo\Documents\workspace-sts-3.8.4.RELEASE\SpringBootMVCExample\target\classes started by lenovo in C:\Users\lenovo\Documents\workspace-sts-3.8.4.RELEASE\SpringBootMVCExample)
2017-09-03 16:43:53.896 INFO 6584 --- [ main] c.n.SpringBootMvcExampleApplication : No active profile set, falling back to default profiles: default
2017-09-03 16:43:54.218 INFO 6584 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@6e38921c: startup date [Sun Sep 03 16:43:54 IST 2017]; root of context hierarchy
2017-09-03 16:43:56.213 INFO 6584 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup 2017-09-03 16:43:56.294 INFO 6584 --- [ main] c.n.SpringBootMvcExampleApplication : Started SpringBootMvcExampleApplication in 3.284 seconds (JVM running for 3.931)
2017-09-03 16:43:56.297 INFO 6584 --- [ Thread-3] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@6e38921c: startup date [Sun Sep 03 16:43:54 IST 2017]; root of context hierarchy
2017-09-03 16:43:56.304 INFO 6584 --- [ Thread-3] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown

最佳答案

请在 pom.xml 中添加以下依赖。

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>

有时候因为maven中的jar冲突,spring boot会自动关机。因此,如果添加上述依赖项后问题仍然存在,请分享 pom.xml

关于spring-boot - 我的 spring-boot mvc 应用程序总是通过显示关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46023178/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com