springboot 打成jar包后访问不到jsp页面处理方式

目录结构

 

 打成jar包后访问不到jsp页面。

 

处理方式:

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.4.2.RELEASE</version>
</plugin>
</plugins>
<resources>
<resource>
<directory>${basedir}/src/main/webapp</directory>
<targetPath>META-INF/resources</targetPath>
<includes>
<include>**</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
</build>
posted @ 2021-03-25 16:43  节日快乐  阅读(185)  评论(0编辑  收藏  举报