SpringBoot-9 启动报错:Unregistering JMX-exposed beans on shutdown

报错信息如下:

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

2018-08-23 17:53:28.851  INFO 14808 --- [           main] qq.MainStart                             : Starting MainStart on DESKTOP-PJEFV1I with PID 14808 (D:\workspace\etms\qq\target\classes started by yyb in D:\workspace\etms\qq)
2018-08-23 17:53:28.856  INFO 14808 --- [           main] qq.MainStart                             : No active profile set, falling back to default profiles: default
2018-08-23 17:53:28.976  INFO 14808 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@27d415d9: startup date [Thu Aug 23 17:53:28 CST 2018]; root of context hierarchy
2018-08-23 17:53:30.081  INFO 14808 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-08-23 17:53:30.103  INFO 14808 --- [           main] qq.MainStart                             : Started MainStart in 1.729 seconds (JVM running for 2.541)
2018-08-23 17:53:30.104  INFO 14808 --- [       Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@27d415d9: startup date [Thu Aug 23 17:53:28 CST 2018]; root of context hierarchy
2018-08-23 17:53:30.105  INFO 14808 --- [       Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

自己尝试后,发现有两种情况会,会导致以上错误。

情况一:


	org.springframework.boot
	spring-boot-starter

解决:


	org.springframework.boot
	spring-boot-starter-web

情况二:


	org.springframework.boot
	spring-boot-starter-parent
	1.5.10.RELEASE

使用了1.5.10版本。官网说1.5.10版本解决了55+bug。但是我本地使用1.5.9启动不会报错(不排除有bug),使用1.5.10启动则会报错Unregistering JMX-exposed beans on shutdown。

解决:

  暂时不用1.5.10版本。

  (目前没找到1.5.10正确的配置方法,有网友知道还请指教)

你可能感兴趣的:(SpringBoot系列)