官网:https://www.thymeleaf.org/
使用:
- 只需要导入thymeleaf启动器即可
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
Thymeleaf 基础测试
- 在接口里自定义数据
- 在html增加Thymeleaf的约束
xmlns:th="http://www.thymeleaf.org"
- 在html里根据Thymeleaf的语法规则取数据
thymeleaf 基础语法
不同类型数据的标签
不同类型数据的取值方法