在进行页面的开发时,一定要在也面的html标签中加入约束文档,即:
xmlns:th="http://www.thymeleaf.org"
用法:
https://www.yuque.com/atguigu/springboot/vgzmgh?inner=USJm1
迭代:
<tr th:each="prod : ${prods}">
<td th:text="${prod.name}">Onions</td>
<td th:text="${prod.price}">2.41</td>
<td th:text="${prod.inStock}? #{true} : #{false}">yes</td>
</tr>
用法类似于jsp,标签语法