Spring boot 嵌入的tomcat不能启动: Unregistering JMX-exposed beans on shutdown

xiaoxiao2021-03-01  23

解决方案1:

首先确定是Web启动方式,即配置pom.xml 配置如下:

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

注意: 因为Spring Boot 默认已经集成了tomcat,所以不需要以下配置

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

解决方案2:

删除Maven tomcat-embed jar缓存 目录:.m2\repository\org\apache\tomcat\embed 清空该目录,让Maven重新下载Jar包就可以

如果还是不能解决:就清空.m2\repository 下的所有文件

转载请注明原文地址: https://www.6miu.com/read-3200314.html

最新回复(0)