为了账号安全,请及时绑定邮箱和手机立即绑定

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

新建项目, 按照老师的步骤, 使用java 1.8.0_121-b13; maven 3.3.9; spring boot1.4.1,  可就是启动不了...

按网上说的, 是tomcat的原因, 我加上依赖还是不行

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


整个控制台输入我贴下, 求大神帮我看看为啥

2017-05-07 21:08:21.593  INFO 1979 --- [           main] com.hommin.GirlApplication               : Starting GirlApplication on lihongmindembp with PID 1979 (/Users/hommin/Documents/workspace/girl/target/classes started by Hommin in /Users/hommin/Documents/workspace/girl)

2017-05-07 21:08:21.605  INFO 1979 --- [           main] com.hommin.GirlApplication               : No active profile set, falling back to default profiles: default

2017-05-07 21:08:21.733  INFO 1979 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@9353778: startup date [Sun May 07 21:08:21 CST 2017]; root of context hierarchy

2017-05-07 21:08:23.131  INFO 1979 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup

2017-05-07 21:08:23.145  INFO 1979 --- [           main] com.hommin.GirlApplication               : Started GirlApplication in 2.277 seconds (JVM running for 2.889)

2017-05-07 21:08:23.145  INFO 1979 --- [       Thread-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@9353778: startup date [Sun May 07 21:08:21 CST 2017]; root of context hierarchy

2017-05-07 21:08:23.146  INFO 1979 --- [       Thread-1] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown


正在回答

14 回答

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

上面这段pom改成下面试下,(https://stackoverflow.com/questions/22380119/why-my-spring-boot-app-always-shutdown)

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


4 回复 有任何疑惑可以回复我~
#1

洪俊勇

pom.xml在哪里呀
2017-11-18 回复 有任何疑惑可以回复我~
#2

慕粉3172092

build.gradle 这里配置,这就相当pom.xml
2018-12-14 回复 有任何疑惑可以回复我~
#3

慕粉3172092

dependencies { compile('org.springframework.boot:spring-boot-starter') compile('org.springframework.boot:spring-boot-starter-tomcat') compile('org.springframework.boot:spring-boot-starter-web') testCompile('org.springframework.boot:spring-boot-starter-test') }
2018-12-14 回复 有任何疑惑可以回复我~

防火墙!我也是这个报错,把防火墙关了就好了,什么配置都不用加

0 回复 有任何疑惑可以回复我~
0 回复 有任何疑惑可以回复我~

添加下面这段代码

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


0 回复 有任何疑惑可以回复我~

xczx

0 回复 有任何疑惑可以回复我~

mvn dependency:purge-local-repository

0 回复 有任何疑惑可以回复我~

我终于知道原因了,各位你们有把外置的maven插件在eclipse里面配置了吗???????

在eclipse里面配置maven插件完美解决,哇哈哈

0 回复 有任何疑惑可以回复我~

加入这个,完美解决

<build>
   <plugins>
       <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
           <configuration>
               <testFailureIgnore>true</testFailureIgnore>
           </configuration>
       </plugin>
   </plugins>
</build>

2 回复 有任何疑惑可以回复我~
#1

掩护朕

然而并不能解决
2017-12-19 回复 有任何疑惑可以回复我~

这个问题有人解决了吗

0 回复 有任何疑惑可以回复我~

2017-10-16 18:22:24.219  INFO 9700 --- [           main] com.zilong.girl.GirlApplication          : Starting GirlApplication on ZZL with PID 9700 (C:\Users\admin\IdeaProjects\girl\target\classes started by admin in C:\Users\admin\IdeaProjects\girl)
2017-10-16 18:22:24.223  INFO 9700 --- [           main] com.zilong.girl.GirlApplication          : The following profiles are active: test
2017-10-16 18:22:24.290  INFO 9700 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@517cd4b: startup date [Mon Oct 16 18:22:24 CST 2017]; root of context hierarchy
2017-10-16 18:22:25.587  INFO 9700 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2017-10-16 18:22:25.598  INFO 9700 --- [           main] com.zilong.girl.GirlApplication          : Started GirlApplication in 1.728 seconds (JVM running for 3.023)
2017-10-16 18:22:25.607  INFO 9700 --- [       Thread-5] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@517cd4b: startup date [Mon Oct 16 18:22:24 CST 2017]; root of context hierarchy
2017-10-16 18:22:25.609  INFO 9700 --- [       Thread-5] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

Process finished with exit code 0

0 回复 有任何疑惑可以回复我~
首页上一页12下一页尾页

举报

0/150
提交
取消
2小时学会Spring Boot
  • 参与学习       151599    人
  • 解答问题       1079    个

Spring Boot入门视频教程,你将学会使用Spring Boot快速构建应用程序

进入课程

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

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信