thymeleaf th:each 获取索引

<tr th:each="user,userStat:${users}">
userStat是状态变量,有 index,count,size,current,even,odd,first,last等属性,如果没有显示设置状态变量,thymeleaf会默 认给个“变量名+Stat"的状态变量。

posted on 2017-08-22 12:01  丛林摄影狮  阅读(1356)  评论(0编辑  收藏  举报

导航