Thymeleaf是什么?

Thymeleaf是一种服务器端Java模板引擎,它通过在html标签中嵌入特殊的语法糖,实现双击html文件即可在浏览器中预览页面效果,又可以在服务端解析处理后渲染出动态页面;

这对于处理UI模板的前端设计人员非常友好,所见即所得。

同时对于服务器端人员来说,只需在html标签中嵌入语法糖,即可启用模板功能,渲染出动态页面,实现了前端设计人员和后端开发人员的职责分离。

Thymeleaf很容易学习与理解,并有着自己鲜明的特色,适合在后台应用,以及各种管理类系统中使用。

本课程将一步一步详解讲解Thymeleaf模板引擎技术,全面掌握Thymeleaf模板技术,并在实际项目开发中得心应手使用Thymeleaf模板技术。


Thymeleaf在线学习:

​ https://www.bilibili.com/video/BV1cq4y1E79S

Thymeleaf资料下载:

​http://www.bjpowernode.com/?51cto​



Thymeleaf的优势在于

1. 以html的属性出现,保证html的完整语法结构不被破坏;

2. 浏览器可直接预览模板文件,无需服务器端支持;

3. 提供了大量内置对象,内置工具类;

4. 语法简单,学习难度低;

5. 支持html,js,raw等多种模板类型;


适应人群:

有一定的Java Web开发基础,掌握SpringBoot,或者有工作经验的人群。


课程目录:


第一章 Thymeleaf小试牛刀

1-1 thymeleaf-模板工作方式

1-2 thymeleaf-文档

1-3 thymeleaf-第一个例子

1-4 thymeleaf-模板使用数据

1-5 thymeleaf-使用模板文件

1-6 thymeleaf-设置模板前缀后缀

1-7 thymeleaf-springboot环境搭建

1-8 thymeleaf-测试springboot中使用模板


第二章 Thymeleaf语法

2-1 thymeleaf-变量表达式基本语法-1

2-2 thymeleaf-变量表达式基本语法-2

2-3 thymeleaf-链接表达式

2-4 thymeleaf-链接表达式传参数

2-5 thymeleaf-国际化介绍

2-6 thymeleaf-自定义LocalResolver

2-7 thymeleaf-国际化模板定义

2-8 thymeleaf-调式国际化

2-9 thymeleaf-文本表达式

2-10 thymeleaf-数字表达式

2-11 thymeleaf-布尔表达式

2-12 thymeleaf-null和空字符串

2-13 thymeleaf-逻辑表达式

2-14 thymeleaf-三元运算符-1

2-15 thymeleaf-三元运算符-2

2-16 thymeleaf-设置属性值

2-17 thymeleaf-attr设置任意属性值

2-18 thymeleaf-设置属性值

2-19 thymeleaf-同时设置多个属性值

2-20 thymeleaf-boolean设置

2-21 thymeleaf-设置标签体文本

2-22 thymeleaf-循环each(1)

2-23 thymeleaf-each循环普通Map

2-24 thymeleaf-each循环ListMap

2-25 thymeleaf-each循环数组

2-26 thymeleaf-each循环给Select组件添加数据

2-27 thymeleaf-each循环的状态变量

2-28 thymeleaf-if使用

2-29 thymeleaf-unless使用


第三章 Thymeleaf模板引用

3-1 thymeleaf-模版的介绍

3-2 thymeleaf-模版insert使用

3-3 thymeleaf-函数模版和当前页面中定义模版

3-4 thymeleaf-使用id引用模版

3-5 thymeleaf-replace和include的对比

3-6 thymeleaf-常用insert-replace

3-7 thymeleaf-re删除

3-8 thymeleaf-re其它的范围值

3-9 thymeleaf-动态指定模版名称

3-10 thymeleaf-inline在js中获取数据

3-11 thymeleaf-inline和text的比较使用

3-12 thymeleaf-禁用内联

3-13 thymeleaf-局部变量


第四章 Thymeleaf内置对象

4-1 thymeleaf-内置工具类

4-2 thymeleaf-内置工具类日期和string

4-3 thymeleaf-内置对象#request

4-4 thymeleaf-内置对象#session和#servletContext

4-5 thymeleaf-快捷对象param

4-6 thymeleaf-快捷对象session和application