springboot启动自动停止问题解决办法


2019-12-10 15:16:37.039  INFO 7484 --- [  restartedMain] c.h.project001.wangyu.WangyuApplication  : Starting WangyuApplication on LAPTOP-V08IB7LS with PID 7484 (D:\Code\Java_Code\wangyu\target\classes started by lenovo in D:\Code\Java_Code\wangyu)
2019-12-10 15:16:37.042  INFO 7484 --- [  restartedMain] c.h.project001.wangyu.WangyuApplication  : No active profile set, falling back to default profiles: default
2019-12-10 15:16:37.111  INFO 7484 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2019-12-10 15:16:37.485  INFO 7484 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JDBC repositories in DEFAULT mode.
2019-12-10 15:16:37.498  INFO 7484 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 9ms. Found 0 JDBC repository interfaces.
2019-12-10 15:16:37.691  INFO 7484 --- [  restartedMain] c.a.d.s.b.a.DruidDataSourceAutoConfigure : Init DruidDataSource
2019-12-10 15:16:38.101  INFO 7484 --- [  restartedMain] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} inited
2019-12-10 15:16:38.416  INFO 7484 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2019-12-10 15:16:38.452  INFO 7484 --- [  restartedMain] c.h.project001.wangyu.WangyuApplication  : Started WangyuApplication in 1.765 seconds (JVM running for 3.569)
2019-12-10 15:16:38.463  INFO 7484 --- [extShutdownHook] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closed

解决办法:在pom.xml中添加以下内容

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>
发布了33 篇原创文章 · 获赞 27 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/eclipse9527/article/details/103476233