First, the introduction of a property in the html start tag
xmlns:th="http://www.thymeleaf.org"
Through the data sample
<tbody> <tr th:each="user:${users}"> <td th:text="${user.name}"></td> <td th:text="${user.email}"></td> <td><a th:href="@{/edit/{id}(id=${user.id})}">修改</a></td> <td><a th:href="@{/delete/{id}(id=${user.id})}">删除</a></td> </tr> </tbody>
Written in html tag attributes th, th: each the equivalent of java code for each cycle
th: text attribute and the value corresponding to the data taken by the variable name $ {}