1、在pom.xml文件中导入jsp依赖的jar包,一个是jstl标签,一个是jsp的引擎
<dependency><groupId>org.apache.taglibs</groupId><artifactId>taglibs-standard-spec</artifactId><version>1.2.5</version>
</dependency>
<dependency><groupId>org.apache.taglibs</groupId><artifactId>taglibs-standard-impl</artifactId><version>1.2.5</version>
</dependency>
<dependency><groupId>org.apache.tomcat.embed</groupId><artifactId>tomcat-embed-jasper</artifactId><version>8.5.34</version>
</dependency>
2、在SpringBoot的全局配置文件中修改SpringBoot的默认视图解析器的前缀和后缀
spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
3、创建一个Controller测试一下行不行
存放在src/main/webapp/WEB-INF/jsp/index.jsp