SpringBootApplication无法启动:Unregistering JMX-exposed beans on shutdown

IDEA new create  Spring Boot Project,

run main class:   SpringbootJdbcApplication Application应用直接退出

2018-02-05 10:25:19.795  INFO 93703 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-02-05 10:25:19.814  INFO 93703 --- [           main] c.e.s.SpringbootJdbcApplication          : Started SpringbootJdbcApplication in 2.272 seconds (JVM running for 3.018)
2018-02-05 10:25:19.815  INFO 93703 --- [       Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@3bd94634: startup date [Mon Feb 05 10:25:18 CST 2018]; root of context hierarchy
2018-02-05 10:25:19.817  INFO 93703 --- [       Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown


原因在于Application 运行时缺少一个容器container, 

项目中为了打成war 包,引入了 依赖,该依赖默认scope 为provided,编译直接运行后,无法确定一个容器,项目无法启动。

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

Solution: 把该依赖注释掉; 或者 把<scope>provided</scope>改为 <scope>compile</scope>

maven dependency scope:  compile\test \runtime\provided\system

reference: http://blog.csdn.net/kimylrong/article/details/50353161


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值