thymeleaf遍历List

  • Post author:
  • Post category:其他




1.接收List

<tr th:each="info:${userList}" >
        <td th:text="${info.id}"></td>
        <td th:text="${info.username}"></td>
</tr>



2.接收List<Map>类型

<tr th:each="maps:${userMap}">
		<td th:text="${maps.id}"></td>
		<td th:text="${maps.name}"></td>
</tr>

对,没错,他俩一模一样,233333
在这里插入图片描述



版权声明:本文为qq_40087986原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。