创建好的springboot-web项目目录结构是024项目这样的,想要在springboot-web项目里添加jsp页springboot-web工程添加jsp页面该如何做呢(如025)?
这样做:
首先: 在pom.xml文件里加入springboot集成jsp的依赖:
<!--springboot集成jsp,仅仅只是展示jsp页面需要添加解析jsp页面的依赖-->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>
在(<build></build>)标签对中添加编译扫描资源文件的资源
<resources>
<resource>
<directory>src/main/webapp</directory>
<targetPath>META-INF/resources</targetPath>
<includes>
<include>*.*</include>
</includes>
</resource>
</resources>