这两天使用springboot + jsp写一个demo在本地开发环境正常, 但是打jar包放到服务器后404(其实接口访问到了,跳转页面404)
原因是pom.xml缺少配置
在build中加上
<!--配置资源目录-->
<resources>
<resource>
<directory>src/main/webapp</directory>
<!--这里必须是META-INF/resources-->
<targetPath>META-INF/resources</targetPath>
<includes>
<include>**/**</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>