项目启动后失败,报Unregistering JMX-exposed beans on shutdown

问题:

我是在创建SpringBoot项目时候,项目跑不起来,控制台打印的是


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

2017-10-02 08:47:16.734  INFO 4048 --- [           main] c.e.demo.SpringBootTestApplication       : Starting SpringBootTestApplication on DESKTOP-7O0ES0O with PID 4048 (E:\stsWorkSpace\SpringBoot_Test\target\classes started by 柴火 in E:\stsWorkSpace\SpringBoot_Test)
2017-10-02 08:47:16.734  INFO 4048 --- [           main] c.e.demo.SpringBootTestApplication       : No active profile set, falling back to default profiles: default
2017-10-02 08:47:16.812  INFO 4048 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@df27fae: startup date [Mon Oct 02 08:47:16 CST 2017]; root of context hierarchy
2017-10-02 08:47:17.890  INFO 4048 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2017-10-02 08:47:17.921  INFO 4048 --- [           main] c.e.demo.SpringBootTestApplication       : Started SpringBootTestApplication in 1.634 seconds (JVM running for 2.256)
2017-10-02 08:47:17.921  INFO 4048 --- [       Thread-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@df27fae: startup date [Mon Oct 02 08:47:16 CST 2017]; root of context hierarchy
2017-10-02 08:47:17.937  INFO 4048 --- [       Thread-1] o.s.j.e.a.AnnotationMBeanExporter        :Unregistering JMX-exposed beans on shutdown
 

解决办法:

pom文件中有一个这样的依赖

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


修改为

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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

CBeann

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值