淡语

导航

Velocity遍历Map对象

#foreach($item in $!indexMap.entrySet())

输出Map的key: $!{item.key}

输出Map的value:$!{item.value}

如果Map的value是一个list,还可以继续遍历

#foreach ($listItem in $!{item.value})
输出list属性:$listItem
#end

#end

posted on 2020-12-28 10:19  object360  阅读(609)  评论(0编辑  收藏  举报