遇到这个问题,我找了很多久,最后在一篇博客中找到了
1.首先由于springboot不支持jsp,需要导入相关依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--<scope>provided</scope>--> <!-- 这地方需要注释 -->
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<!--<scope>provided</scope>-->
</dependency>
2.配置视图
3.这里就是遇到的坑,由于多模块找不到webapp,需要设置工作路径为当前模块。
把working dirctory修改为:MODULE_DIR(当前模块路径)