spring-boot.error1 Unregistering JMX-exposed beans on shutdown

废话少说,错误提示如下:

2018-03-25 14:25:28.535  INFO 9656 --- [           main] com.fxb.familyui.FamilyUiApplication     : Starting FamilyUiApplication on PC-20171018NMAF with PID 9656 (G:\application\family\family-ui\target\classes started by Administrator in G:\application\family)

2018-03-25 14:25:28.541  INFO 9656 --- [           main] com.fxb.familyui.FamilyUiApplication     : The following profiles are active: dev
2018-03-25 14:25:28.598  INFO 9656 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@351d00c0: startup date [Sun Mar 25 14:25:28 CST 2018]; root of context hierarchy
2018-03-25 14:25:29.286  INFO 9656 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-03-25 14:25:29.301  INFO 9656 --- [           main] com.fxb.familyui.FamilyUiApplication     : Started FamilyUiApplication in 1.569 seconds (JVM running for 3.52)
2018-03-25 14:25:29.305  INFO 9656 --- [       Thread-6] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@351d00c0: startup date [Sun Mar 25 14:25:28 CST 2018]; root of context hierarchy

2018-03-25 14:25:29.307  INFO 9656 --- [       Thread-6] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown


原因是:

    1.springboot内置的tomcat,未能正常启动。

解决方法:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <version>${spring.boot.version}</version>
</dependency>

2. tomcat启动了,不能解析Bean。看看是否缺少如下依赖:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <version>${spring.boot.version}</version>
</dependency>

3. 依赖导入错误也可能出现这个问题:比如1.5和2.0的依赖冲突。





posted @ 2018-03-25 14:32  方家小白  阅读(28)  评论(0编辑  收藏  举报