thymeleaf 模板语法详解 上

it2022-05-05  213

一. Standard Expression Syntax (标准表达式语法)


1.Variables (变量)

上图所示,1、2、4红圈表达式使用最为多。无非是后台给数据,前台取值。在 html 使用 thymeleaf 语法 要引入 thymeleaf命名空间。

<html xmlns:th="http://www.thymeleaf.org">

1.传对象取值。 示例: 2. #{}的使用(在 $ 内使用 utility 内置对象) 示例:

2.1 日期: 2.2 list

更多语法请查看: thymeleaf 模板语法详解 中 thymeleaf 模板语法详解 下


最新回复(0)