spring.mvc.view.prefix= /WEB-INF/jsp/
spring.mvc.view.suffix= .jsp

pom.xml

 <!--jsp支持-->
<!-- servlet 依赖. -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<!-- tomcat 的支持.-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
Application.java
@SpringBootApplication
@EnableCaching(proxyTargetClass = true) // 开启缓存功能
public class Application extends SpringBootServletInitializer implements CommandLineRunner { // Java EE应用服务器配置,
// 如果要使用tomcat来加载jsp的话就必须继承SpringBootServletInitializer类并且重写其中configure方法
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class);
} // 入口
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
} }

springboot配置jsp的更多相关文章

  1. springboot 配置jsp支持

      springboot默认并不支持jsp模板,所以需要配置. 下面是一个可以运行的例子: 首先配置属性文件: spring.http.encoding.force=true spring.http. ...

  2. spring-boot 配置jsp

    sring-boot 集成  jsp spring-boot默认使用的页面展示并不是jsp,若想要在项目中使用jsp还需要配置一番. 虽然spring-boot中也默认配置了InternalResou ...

  3. springboot整合jsp,完成公交车站路线图

    转: springboot整合jsp,完成公交车站路线图 点赞再看,养成习惯 开发环境: jdk 8 intellij idea tomcat 8 mysql 5.7 maven 3.6 所用技术: ...

  4. SpringBoot配置使用jsp页面技术

    SpringBoot配置使用jsp页面技术 1.pom配置 package配置必须为war类型 添加依赖 <packaging>war</packaging> <depe ...

  5. springboot配置对jsp页面的解析支持

    pom.xml文件配置依赖信息 <!--引入Spring Boot内嵌的Tomcat对JSP的解析包,不加解析不了jsp页面--> <dependency> <group ...

  6. SpringBoot配置属性之Server

    SpringBoot配置属性系列 SpringBoot配置属性之MVC SpringBoot配置属性之Server SpringBoot配置属性之DataSource SpringBoot配置属性之N ...

  7. SpringBoot集成jsp

    一.springBoot集成jsp: 1.修改pom文件 <!--集成jsp所需jar包--> <!--jsp页面使用jstl标签--> <dependency> ...

  8. SpringBoot整合Jsp和Thymeleaf (附工程)

    前言 本篇文章主要讲述SpringBoot整合Jsp以及SpringBoot整合Thymeleaf,实现一个简单的用户增删改查示例工程.事先说明,有三个项目,两个是单独整合的,一个是将它们整合在一起的 ...

  9. springboot配置server相关配置&整合模板引擎Freemarker、thymeleaf&thymeleaf基本用法&thymeleaf 获取项目路径 contextPath 与取session中信息

    1.Springboot配置server相关配置(包括默认tomcat的相关配置) 下面的配置也都是模板,需要的时候在application.properties配置即可 ############## ...

随机推荐

  1. codeforces158C

    Cd and pwd commands CodeForces - 158C Vasya is writing an operating system shell, and it should have ...

  2. Civil 3D 二次开发 创建AutoCAD对象—— 00 ——

    不积跬步无以至千里,不积小流无以成江海.虽然创建一条直线.添加一个图层这样的小程序没有什么实际意义(内部命令很简单就可以完成),但对于初学二次开发的您来说,这可是一大步,这一步跨出去,您就跨进了二次开 ...

  3. [BZOJ 3498] [PA 2009] Cakes

    Description \(n\) 个点 \(m\) 条边,每个点有一个点权 \(a_i\). 对于任意一个三元环 \((i,j,k)(i<j<k)\),它的贡献为 \(\max(a_i, ...

  4. VMware ezmomi工具使用

    用两个静态IP克隆模板: ezmomi clone --template centos67 --hostname test01 --cpus 2 --mem 4 --ips 172.10.16.203 ...

  5. BZOJ2658 ZJOI2012 小蓝的好友(treap)

    显然转化为求不包含关键点的矩形个数.考虑暴力,枚举矩形下边界,求出该行每个位置对应的最低障碍点高度,对其建笛卡尔树,答案即为Σhi*(slson+1)*(srson+1),即考虑跨过该位置的矩形个数. ...

  6. Codeforces Round #432 Div. 1

    A:大胆猜想合法点不会很多,于是暴力检验,一旦发现不合法就break,可以random_shuffle一下. #include<iostream> #include<cstdio&g ...

  7. js窗体间传值

    A页面传值给 B页面 页面A <html xmlns="http://www.w3.org/1999/xhtml"> <HEAD> <TITLE> ...

  8. 基于Thinkphp5.0 小程序登录插件应用

    资源连接: wulongtao/think-wxminihelper 具体怎么安装,不介绍了,有不懂再问我吧: 主要重点如下: wepy:index.wpy this.$parent.getUserI ...

  9. Python中使用operator模块实现对象的多级排序

    Python中使用operator模块实现对象的多级排序 今天碰到一个小的排序问题,需要按嵌套对象的多个属性来排序,于是发现了Python里的operator模块和sorted函数组合可以实现这个功能 ...

  10. Nginx log日志切割shell

    #!/bin/bash#此脚本用于自动分割Nginx的日志,包括access.log和error.log#每天00:00执行此脚本 将前一天的access.log重命名为access-xxxx-xx- ...