IDEA 新建spring Boot 项目新建后启动失败, 提示Unregistering JMX-exposed beans on shutdown...

建项目的步骤:

 

113738_JYOl_2814828.png

113630_R0AM_2814828.png

新建好项目后运行,出错:

113651_5ym8_2814828.png

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

2017-09-05 11:25:45.397  INFO 10244 --- [           main] com.example.demo.DemoApplication         : Starting DemoApplication on admin-PC with PID 10244 (D:\usr\demo\target\classes started by admin in D:\usr\demo)
2017-09-05 11:25:45.399  INFO 10244 --- [           main] com.example.demo.DemoApplication         : No active profile set, falling back to default profiles: default
2017-09-05 11:25:45.428  INFO 10244 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@120d6fe6: startup date [Tue Sep 05 11:25:45 CST 2017]; root of context hierarchy
2017-09-05 11:25:45.748  WARN 10244 --- [           main] o.h.v.m.ParameterMessageInterpolator     : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported
2017-09-05 11:25:45.825  WARN 10244 --- [           main] o.h.v.m.ParameterMessageInterpolator     : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported
2017-09-05 11:25:45.999  INFO 10244 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2017-09-05 11:25:46.008  INFO 10244 --- [           main] com.example.demo.DemoApplication         : Started DemoApplication in 0.759 seconds (JVM running for 1.246)
2017-09-05 11:25:46.009  INFO 10244 --- [       Thread-4] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@120d6fe6: startup date [Tue Sep 05 11:25:45 CST 2017]; root of context hierarchy
2017-09-05 11:25:46.010  INFO 10244 --- [       Thread-4] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

Process finished with exit code 0

解决方法:

 

需要添加tomcat插件, 还不能有<scope>provided</scope> 添加依赖:
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>

然后刷新项目。再次运行:

转载于:https://my.oschina.net/ch66880/blog/1529174

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值