(1)springboot 打包无webapp 解决方式
配置 < resources>将webapp打包进target/classes 目录,其中< targetPath>META-INF/resources</ targetPath> 指定将webapp打包到target/classes 目录的META-INF/resources 目录下,必须这样配置,否则会出错
<resources>
<resource>
<directory>src/main/webapp</directory>
<targetPath>META-INF/resources</targetPath>
<includes>
<include>**/**</include>
</includes>
<!--<filtering>false</filtering>-->
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
(2)springboot 打包成功无法访问jsp
将maven打包插件的版本改为1.4.2
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.4.2.RELEASE</version>
</plugin>