SpringBoot thymeleaf模板版本

thymeleaf模板更换版本

修改thymeleaf模板版本

================================

©Copyright 蕃薯耀 2018年3月27日

http://www.cnblogs.com/fanshuyao/

一、SpringBoot 使用thymeleaf模板需要引用依赖的Jar包:

  1. <dependency>
  2. <groupId>org.springframework.boot</groupId>
  3. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  4. </dependency>

二、SpringBoot中thymeleaf的默认版本为:1.5.10.RELEAS

  1. <dependency>
  2. <groupId>org.springframework.boot</groupId>
  3. <artifactId>spring-boot-starter-validation</artifactId>
  4. <version>1.5.10.RELEASE</version>
  5. </dependency>

三、修改thymeleaf模板的版本

properties标签加入如下配置:

  1. <properties>
  2. <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
  3. <thymeleaf-layout-dialect.version>2.0.4</thymeleaf-layout-dialect.version>
  4. </properties>

示例如下:

  1. <properties>
  2. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  3. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  4. <java.version>1.8</java.version>
  5. <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
  6. <thymeleaf-layout-dialect.version>2.0.4</thymeleaf-layout-dialect.version>
  7. </properties>

注意:thymeleaf 版本3已经重写,thymeleaf-layout-dialect必须为2以上的版本

================================

©Copyright 蕃薯耀 2018年3月27日

http://www.cnblogs.com/fanshuyao/

SpringBoot thymeleaf模板版本,thymeleaf模板更换版本的更多相关文章

  1. SpringBoot Web开发(4) Thymeleaf模板与freemaker

    SpringBoot Web开发(4) Thymeleaf模板与freemaker 一.模板引擎 常用得模板引擎有JSP.Velocity.Freemarker.Thymeleaf SpringBoo ...

  2. SpringBoot系列:Spring Boot使用模板引擎Thymeleaf

    一.Java模板引擎 模板引擎(这里特指用于Web开发的模板引擎)是为了使用户界面与业务数据(内容)分离而产生的,它可以生成特定格式的文档,用于网站的模板引擎就会生成一个标准的HTML文档. 在jav ...

  3. SpringBoot 整合 Thymeleaf & 如何使用后台模板快速搭建项目

    如果你和我一样,是一名 Java 道路上的编程男孩,其实我不太建议你花时间学 Thymeleaf,当然他的思想还是值得借鉴的.但是他的本质在我看来就是 Jsp 技术的翻版(Jsp 现在用的真的很少很少 ...

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

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

  5. springboot之freemarker 和thymeleaf模板web开发

    Spring Boot 推荐使用Thymeleaf.FreeMarker.Velocity.Groovy.Mustache等模板引擎.不建议使用JSP. 一.Spring Boot 中使用Thymel ...

  6. SpringBoot入门系列(四)整合模板引擎Thymeleaf

    前面介绍了Spring Boot的优点,然后介绍了如何快速创建Spring Boot 项目.不清楚的朋友可以看看之前的文章:https://www.cnblogs.com/zhangweizhong/ ...

  7. SpringBoot:模板引擎 thymeleaf、ContentNegotiatingViewResolver、格式化转换器

    目录 模板引擎 thymeleaf ContentNegotiatingViewResolver 格式化转换器 模板引擎 thymeleaf.ContentNegotiatingViewResolve ...

  8. springboot的推荐模板引擎-Thymeleaf

    1)添加对themeleaf的支持的依赖 <!--Thymeleaf--> <dependency> <groupId>org.springframework.bo ...

  9. Thymeleaf常用语法:模板片断

    系统中的很多页面有很多公共内容,例如菜单.页脚等,这些公共内容可以提取放在一个称为“模板片断”的公共页面里面,其它页面可以引用这个 “模板片断”内容. 一.模板片断的定义 可以是html标签,也可以使 ...

随机推荐

  1. web界面设计

    本书描述了6个设计原理,即直截了当.简化交互.足不出户.提供邀请.使用变换.即时反应. 一.直截了当(alan cooper:"在哪里输出,就要允许在哪里输入") 1.1 行内编辑 ...

  2. JAVA多线程笔试题

    一.题目内容 二.我的答案 利用了线程池.考虑了超时处理.不知道这样写是否还有其他问题,或者更好更优的解决方案? import java.util.*; import java.util.concur ...

  3. IDEA中maven项目导jar包太慢

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/PROGRAM_anywhere/article/details/53842058参考了网上的一些教程 ...

  4. ajax实现模糊查询完成列表信息显示

    之前遗留一个老问题:列表模糊查询,用的直接是form提交,点击搜索按扭后,页面刷新,搜索框中关键词就没了,这鸡肋的体验,我发誓一定要搞定它 但是鉴于自己写代码是纯粹玩票,我写代码没有目标,只有在当前工 ...

  5. hostapd作为radius服务器

    使用hostapd作为radius服务器,用于企业wifi加密认证. 参考链接: http://www.cnblogs.com/claruarius/p/5902141.html 去网上下载hosta ...

  6. 第三百五十二节,Python分布式爬虫打造搜索引擎Scrapy精讲—chrome谷歌浏览器无界面运行、scrapy-splash、splinter

    第三百五十二节,Python分布式爬虫打造搜索引擎Scrapy精讲—chrome谷歌浏览器无界面运行.scrapy-splash. splinter 1.chrome谷歌浏览器无界面运行 chrome ...

  7. elasticsearch系列三:索引详解(分词器、文档管理、路由详解(集群))

    一.分词器 1. 认识分词器  1.1 Analyzer   分析器 在ES中一个Analyzer 由下面三种组件组合而成: character filter :字符过滤器,对文本进行字符过滤处理,如 ...

  8. SpringBoot系列八:SpringBoot整合消息服务(SpringBoot 整合 ActiveMQ、SpringBoot 整合 RabbitMQ、SpringBoot 整合 Kafka)

    声明:本文来源于MLDN培训视频的课堂笔记,写在这里只是为了方便查阅. 1.概念:SpringBoot 整合消息服务 2.具体内容 对于异步消息组件在实际的应用之中会有两类: · JMS:代表作就是 ...

  9. (转)关于yuv 格式:planar和semi-planar格式

    关于yuv 格式 YUV 格式通常有两大类:打包(packed)格式和平面(planar)格式.前者将 YUV 分量存放在同一个数组中,通常是几个相邻的像素组成一个宏像素(macro-pixel);而 ...

  10. Java注解Annotation学习笔记

    一.自定义注解 1. 使用关键字 @interface 2. 默认情况下,注解可以修饰 类.方法.接口等. 3. 如下为一个基本的注解例子: //注解中的成员变量非常像定义接口 public @int ...