第一步:确定项目的打包形式是war 形式 <packaging>war</packaging>
第二步:在pom.xml中加入依赖 ,加入依赖的目的是派出内嵌的tomcat
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
第三步:pom.xml中 加入maven编译插件
<!-- maven编译插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<!-- since 2.0 -->
<version>3.7.0</version>
<configuration>
<!-- use the Java 8 language features -->
<source>1.8</source>
<!-- want the compiled cl