一、问题描述:运行springboot正常,访问其jsp页面报错
二、问题分析:
1、查看编译后的class目录发现,其中没有jsp文件:
2、发现我的web根目录不在main下,而是在src下:
三、问题解决:
1、将web根目录文件,放到main中:
2、重新指定jsp编译后的位置为META-INF(在build中加入):
<resource>
<!--jsp原来的目录-->
<directory>src/main/webapp</directory>
<!--指定编译后的存放目录-->
<targetPath>META-INF/resources</targetPath>
<!--指定处理的目录和文件-->
<includes>
<include>**/*.*</include>
</includes>
</resource>