变量表达式
语法: ${...}
<span th:text="${book.author.name}"> 在文本中获取值且付给th:text属性里;
消息表达式
语法: #{.....}
<th th:text="#{header.address.city}">
用于国际化
选择表达式
语法: *{....}
<div th:object="${book}">
<span th:text="*{title}">.....</span>
</div>
与变量表达式的区别:他们是在当前选择的对象而不是整个上下文变量映射上执行
链接表达式
语法: @{...}
分段表达式
语法: th:insert 或th:replace
字面量
' '
- 无操作
设置任意属性值
语法: th:attr
<input type="submit" value="Subscribe!" th:attr="value=#{subscribe.submit}"/>
迭代器
语法: th:each
<li th:each="book : ${books}" th:text="${book.title}"> En las orillas </li>
状态变量 用来跟踪迭代器的状态
index count size current even/odd first last
内连
th:inline="none" 禁用内联表达式