SpringBoot启动失败:出现错误——HikariPool-1 - Shutdown initiated...后立即出现 HikariPool-1 - Shutdown completed.

问题:


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

2021-04-12 10:08:16.432  INFO 12728 --- [           main] c.b.m.s.p.PaginationApplication          : Starting PaginationApplication on LAPTOP-J3Q53C5V with PID 12728 (C:\Users\Documents\毕设\study\mybatis-plus-samples\mybatis-plus-sample-pagination\target\classes started by mahao in C:\Users\)
2021-04-12 10:08:16.432 DEBUG 12728 --- [           main] c.b.m.s.p.PaginationApplication          : Running with Spring Boot v2.3.5.RELEASE, Spring v5.2.10.RELEASE
2021-04-12 10:08:16.432  INFO 12728 --- [           main] c.b.m.s.p.PaginationApplication          : No active profile set, falling back to default profiles: default
2021-04-12 10:08:17.097  INFO 12728 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2021-04-12 10:08:17.191  INFO 12728 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
 _ _   |_  _ _|_. ___ _ |    _ 
| | |\/|_)(_| | |_\  |_)||_|_\ 
     /               |         
                        3.4.1 
2021-04-12 10:08:17.870  INFO 12728 --- [           main] c.b.m.s.p.PaginationApplication          : Started PaginationApplication in 1.971 seconds (JVM running for 2.675)
2021-04-12 10:08:17.886  INFO 12728 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2021-04-12 10:08:17.886  INFO 12728 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.

原因分析:

缺少spring-boot-starter-web依赖

解决:

添加spring-web的启动依赖

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

正确启动控制台显示:

 _ _   |_  _ _|_. ___ _ |    _ 
| | |\/|_)(_| | |_\  |_)||_|_\ 
     /               |         
                        3.4.1 
2021-04-12 10:26:57.810  INFO 16780 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2021-04-12 10:26:57.944  INFO 16780 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2021-04-12 10:26:57.955  INFO 16780 --- [           main] c.b.m.s.p.PaginationApplication          : Started PaginationApplication in 2.136 seconds (JVM running for 2.941)

 

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值