具体配置文件
网上查询了很多都太乱了
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- 指定程序的入口,不然会访问失败 -->
<version>1.4.2.RELEASE</version>
<configuration>
<fork>true</fork>
<mainClass>com.example.webtest.WebtestApplication</mainClass>
</configuration>
</plugin>
</plugins>
<resources>
<!-- 打包webapp下的资源到META-INF/resources目录下
注:此操作后resources资源就不会再进行打包-->
<resource>
<directory>src/main/webapp</directory>
<targetPath>META-INF/resources</targetPath>
<includes>
<include>**/**</include>
</includes>
</resource>
<!-- 打包resources下的资源 -->
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/**</include>
</includes>
</resource>
</resources>
</build>