Velocity 开发团队今天发布了 Velocity Engine 1.7-beta1 版本。
与1.6 版本相比较,1.7 主要改进内容包括:
- 支持宏实体,调用方法形如 #@foo() $bodyContent #end
- Can now escape single and double quotes in strings by doubling them
- Added #[[this is included in the output but not parsed]]# syntax to replace #literal
- All #set calls are now global by default; no more implicit local namespaces (not that there were well functioning ones before). To #set a local variable, use the new provided namespaces: $foreach, $macro, $template, $evaluate, $define and $foo (would exist inside the body of #@foo() #end). These must now be used to #set any variable "locally" like this: #set( $macro.mylocal = 'foo' ). When nested, access to parent namespaces is similarly explicit (e.g. $macro.parent). Please see the change log for details.
- Enhanced #break to function anywhere and optionally accept a namespace argument when you want to break beyond the nearest scope. (e.g. #break( $macro ))
- Added bracketed index syntax: $foo[0] or #set( $foo[0] = 1 )
- #stop now ends rendering/execution of a template, not parsing of a template
- OSGI-ready manifests are now provided in the jars
- A variety of small bugfixes, performance boosts and better exceptions/logging.
- Removed very obsolete Veltag and WebMacro conversion code.
更多详情请看 change log.
下载 Velocity 1.7-beta1 here
引用来自“红薯”的评论
引用来自“壁虎”的评论
没试过,所以才用问号。有空试试去,不过1.6.3就OK。
1.7 我怀疑是误操作,这个版本实际还没到发布的时候。
引用来自“壁虎”的评论
没试过,所以才用问号。有空试试去,不过1.6.3就OK。
1.7 我怀疑是误操作,这个版本实际还没到发布的时候。
引用来自“壁虎”的评论
引用来自“红薯”的评论
太扯了,这东西还下载不了,只能通过SVN去获取代码。
引用来自“红薯”的评论
太扯了,这东西还下载不了,只能通过SVN去获取代码。