thymeleaf Usage Records

Reference link: https: //www.cnblogs.com/topwill/p/7434955.html

1, the basic cycle

<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>

2, th: href usage

 <a data-toggle="collapse" th:href="@{'tabs_panels.html#'+${attrGroup.name}}" th:text="${attrGroup.name}"></a>

Guess you like

Origin www.cnblogs.com/webttt/p/11572318.html