SpringBoot thymeleaf模板版本,thymeleaf模板更换版本
SpringBoot thymeleaf模板版本
thymeleaf模板更换版本
修改thymeleaf模板版本
================================
©Copyright 蕃薯耀 2018年3月27日
http://www.cnblogs.com/fanshuyao/
一、SpringBoot 使用thymeleaf模板需要引用依赖的Jar包:
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-thymeleaf</artifactId>
- </dependency>
二、SpringBoot中thymeleaf的默认版本为:1.5.10.RELEAS
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-validation</artifactId>
- <version>1.5.10.RELEASE</version>
- </dependency>
三、修改thymeleaf模板的版本
properties标签加入如下配置:
- <properties>
- <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
- <thymeleaf-layout-dialect.version>2.0.4</thymeleaf-layout-dialect.version>
- </properties>
示例如下:
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <java.version>1.8</java.version>
- <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
- <thymeleaf-layout-dialect.version>2.0.4</thymeleaf-layout-dialect.version>
- </properties>
注意:thymeleaf 版本3已经重写,thymeleaf-layout-dialect必须为2以上的版本
================================
©Copyright 蕃薯耀 2018年3月27日
http://www.cnblogs.com/fanshuyao/
SpringBoot thymeleaf模板版本,thymeleaf模板更换版本的更多相关文章
- SpringBoot Web开发(4) Thymeleaf模板与freemaker
SpringBoot Web开发(4) Thymeleaf模板与freemaker 一.模板引擎 常用得模板引擎有JSP.Velocity.Freemarker.Thymeleaf SpringBoo ...
- SpringBoot系列:Spring Boot使用模板引擎Thymeleaf
一.Java模板引擎 模板引擎(这里特指用于Web开发的模板引擎)是为了使用户界面与业务数据(内容)分离而产生的,它可以生成特定格式的文档,用于网站的模板引擎就会生成一个标准的HTML文档. 在jav ...
- SpringBoot 整合 Thymeleaf & 如何使用后台模板快速搭建项目
如果你和我一样,是一名 Java 道路上的编程男孩,其实我不太建议你花时间学 Thymeleaf,当然他的思想还是值得借鉴的.但是他的本质在我看来就是 Jsp 技术的翻版(Jsp 现在用的真的很少很少 ...
- springboot配置server相关配置&整合模板引擎Freemarker、thymeleaf&thymeleaf基本用法&thymeleaf 获取项目路径 contextPath 与取session中信息
1.Springboot配置server相关配置(包括默认tomcat的相关配置) 下面的配置也都是模板,需要的时候在application.properties配置即可 ############## ...
- springboot之freemarker 和thymeleaf模板web开发
Spring Boot 推荐使用Thymeleaf.FreeMarker.Velocity.Groovy.Mustache等模板引擎.不建议使用JSP. 一.Spring Boot 中使用Thymel ...
- SpringBoot入门系列(四)整合模板引擎Thymeleaf
前面介绍了Spring Boot的优点,然后介绍了如何快速创建Spring Boot 项目.不清楚的朋友可以看看之前的文章:https://www.cnblogs.com/zhangweizhong/ ...
- SpringBoot:模板引擎 thymeleaf、ContentNegotiatingViewResolver、格式化转换器
目录 模板引擎 thymeleaf ContentNegotiatingViewResolver 格式化转换器 模板引擎 thymeleaf.ContentNegotiatingViewResolve ...
- springboot的推荐模板引擎-Thymeleaf
1)添加对themeleaf的支持的依赖 <!--Thymeleaf--> <dependency> <groupId>org.springframework.bo ...
- Thymeleaf常用语法:模板片断
系统中的很多页面有很多公共内容,例如菜单.页脚等,这些公共内容可以提取放在一个称为“模板片断”的公共页面里面,其它页面可以引用这个 “模板片断”内容. 一.模板片断的定义 可以是html标签,也可以使 ...
随机推荐
- 通过android studio上传项目到github
第一步,下载git客户端,并且安装 下载地址:https://git-for-windows.github.io/ 第二步,在android studio中配置git(注意第一张图中的C:\Progr ...
- hashMap 临界值初步理解
import java.util.*; public class Bs { //Integer.highestOneBit((number - 1) << 1)分解 public stat ...
- [转]Idea2016 使用Maven配置简单Web项目(受益比较多的一篇)
最近被同事一直吵着用Idea写Java,于是偷偷的去试用了一下Idea.确实不错,无论界面还是智能提醒都是蛮符合我的使用习惯,但是刚从Eclipse出来,使用Idea还是不太习惯的.所以这里写出来,供 ...
- Mybatis系列(二):优化MyBatis配置文件中的配置和解决字段名与实体类属性名不相同的冲突
原文链接:http://www.cnblogs.com/xdp-gacl/p/4264301.html http://www.cnblogs.com/xdp-gacl/p/4264425.ht ...
- e801. 创建一个JProgressBar组件
A progress bar is used to visually indicate how much a task has been progressed. A progress bar can ...
- android中清空一个表---类似truncate table 表名 这样的功能 android sqlite 清空数据库的某个表
public void clearFeedTable(){ String sql = "DELETE FROM " + FEED_TABLE_NAME +";" ...
- C#.NET MVC 枚举转dictionary自动装载生成下拉框
/// <summary> /// 枚举转SelectListItem /// </summary> public class Enum_Helper { /// < ...
- Win10尝鲜体验——初识传说中不一样的Windows 分类: 资源分享 2015-07-24 18:27 13人阅读 评论(0) 收藏
这几天,网上传来一个消息,虽然不知是好是坏,Win10可以下载安装了! 出于好奇,下载尝鲜,几个截图,留作纪念~ 中文,还是要好好支持的,毕竟中国有如此多的用户 可选的安装版本 许可条款也刚刚出炉,估 ...
- fence-agents kvm 实验
1, Method of installing fence-agents on linux: $ git clone https://github.com/ClusterLabs/fence-agen ...
- 文本框中的回车处理 js
<input id="txtOrderID" onkeypress="getKey(event)" /> <button onclick=&q ...