th:text、th:if、th:unless、th:each语法
<span th:text="${message}">默认文本</span>
<div th:if="${user.loggedIn}">Welcome back, user!</div>
<div th:unless="${user.loggedIn}">Please log in to continue.</div>
<ul>
<li th:each="item : ${items}">
<span th:text="${item}"></span>
</li>
</ul>
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Good Thymes Virtual Grocery</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" media="all"
href="../../css/gtvg.css" th:href="@{/css/gtvg.css}" />
</head>
<body>
<p th:text="#{home.welcome}">Welcome to our grocery store!</p>
</body>
</html>