SpringBoot配置使用jsp页面技术
1.pom配置
- package配置必须为war类型
- 添加依赖
<packaging>war</packaging> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> </dependency>
2.配置文件application.properties
以下配置必须配置
spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
application.message=Hello
3.在src目录下创建webapp/WEB-INF/jsp目录
4.创建项目结构