springboot项目中的pom.xml中内嵌tomcat:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--<scope>provided</scope>-->
<scope>compile</scope>
</dependency>
如果是用tomcat的启动就要使用provided,使内置的失效,如果是main启动则用compile,自动编译。