1. Spring boot 嵌入的tomcat不能启动: Unregistering JMX-exposed beans on shutdown
在官网(http://start.spring.io/)上generate project,将生成的项目导入idea中,运行之后控制台输出“Unregistering JMX-exposed beans on shutdown”,
tomcat也没有运行。寻找原因,看了下pom.xml文件中tomcat依赖关系如下:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--
<scope>provided</scope>
-->
</dependency>
将<scope>provided</scope>注释掉,重新运行项目便可启动嵌入的tomcat服务器:Tomcat started on port(s): 8080 (http)
参见:http://blog.csdn.net/sun20100912/article/details/52013463
如果还不行,在引入WEB包:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>