📜  迭代百里香 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:16.104000             🧑  作者: Mango

代码示例1
Thymeleaf provides a special status object that gives some useful information about the iteration process.

The status object contains the following information:

iteration index, starting from 0 - the ${custStat.index} property,
iteration index, starting from 1 - the ${custStat.count} property.
total amount of elements in the iterated variable - the ${custStat.size} property.
iter variable for each iteration - the ${custStat.current} property.
Whether the current iteration is even or odd. These are the ${custStat.even} and ${custStat.odd} boolean properties.
Whether the current iteration is the first one. This is the ${custStat.first} boolean property.
Whether the current iteration is the last one. This is the ${custStat.last} boolean property.