velocity 使用笔记

1. velocity获取字符串长度方法:

    用length()就可以了,截取子字符串用substring(0,10) 。$str.substring(0,3)

    集合获取集合长度用:size()

 

2. volecity遍历map:

      #foreach($infos in $lineBusiness.entrySet()) 

          ${infos.key} ${infos.value} 

      #end

      详见:http://mingyundezuoan.iteye.com/blog/2205182

 

3. $velocityCount是循环的索引值

    设置新属性:#set($temp=$velocityCount)

 

4. 

posted @ 2015-08-07 21:20  Jtianlin  阅读(424)  评论(0编辑  收藏  举报