如何在百里香中循环1到5?

时间:2017-02-14 01:51:01

标签: thymeleaf

我想在百里香中循环1到5,类似于jsp代码:

<c: forEach begin = "1" end = "5" varStatus = "V"> </ c: forEach>.

1 个答案:

答案 0 :(得分:9)

<th:block th:each="i: ${#numbers.sequence(1, 5)}"></th:block>