springboot启动成功又自动关闭错误 | Unregistering JMX-exposed beans on shutdown

错误代码:

2020-05-28 11:10:31.596  INFO 10112 --- [           main] com.java.discuss.DiscussStart            : Starting DiscussStart on DESKTOP-QHHJNFQ with PID 10112 (D:\Java\softJavaWorking\U4\Discuss\target\classes started by tmyue in D:\Java\softJavaWorking\U4\Discuss)
2020-05-28 11:10:31.601  INFO 10112 --- [           main] com.java.discuss.DiscussStart            : No active profile set, falling back to default profiles: default
2020-05-28 11:10:31.654  INFO 10112 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@1b06cab: startup date [Thu May 28 11:10:31 CST 2020]; root of context hierarchy
2020-05-28 11:10:33.058  INFO 10112 --- [           main] org.mongodb.driver.cluster               : Cluster created with settings {hosts=[localhost:27017], mode=MULTIPLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
2020-05-28 11:10:33.059  INFO 10112 --- [           main] org.mongodb.driver.cluster               : Adding discovered server localhost:27017 to client view of cluster
2020-05-28 11:10:33.107  INFO 10112 --- [localhost:27017] org.mongodb.driver.connection            : Opened connection [connectionId{localValue:1, serverValue:22}] to localhost:27017
2020-05-28 11:10:33.109  INFO 10112 --- [localhost:27017] org.mongodb.driver.cluster               : Monitor thread successfully connected to server with description ServerDescription{address=localhost:27017, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 4, 6]}, minWireVersion=0, maxWireVersion=5, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=null, roundTripTimeNanos=1274800}
2020-05-28 11:10:33.110  INFO 10112 --- [localhost:27017] org.mongodb.driver.cluster               : Discovered cluster type of STANDALONE
2020-05-28 11:10:33.321  INFO 10112 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2020-05-28 11:10:33.340  INFO 10112 --- [           main] com.java.discuss.DiscussStart            : Started DiscussStart in 2.155 seconds (JVM running for 3.001)
2020-05-28 11:10:33.344  INFO 10112 --- [       Thread-6] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@1b06cab: startup date [Thu May 28 11:10:31 CST 2020]; root of context hierarchy
2020-05-28 11:10:33.348  INFO 10112 --- [       Thread-6] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

解决:添加web依赖

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值