HTML使用th标签给表格增加序号使用Stat.index+1<tbody th:each="goods:${goodsList}"><tr> <td> <span th:text="${goodsStat.index+1}"></span> </td></tr>