References begin with $ and are used to get something. Directives begin with # and are used to do something
#set($name='')
#set($info = "hello $name")
单引号赋值和双引号赋值的区别:
用单引号赋值时,单引号内是什么就按原型赋值给变量
双引号赋值时,双引号内还可以引用变量
单行注释
##
多行注释
#*
*#
#**
This is a VTL comment block and
may be used to store such information
as the document author and versioning
information:
@author
@version 5
*#
在脚本中引用你自己的对象时,是可以配置的 详细见
org.apache.velocity.tools.generic
Class ListTool
#set($name='')
#set($info = "hello $name")
单引号赋值和双引号赋值的区别:
用单引号赋值时,单引号内是什么就按原型赋值给变量
双引号赋值时,双引号内还可以引用变量
单行注释
##
多行注释
#*
*#
#**
This is a VTL comment block and
may be used to store such information
as the document author and versioning
information:
@author
@version 5
*#
在脚本中引用你自己的对象时,是可以配置的 详细见
org.apache.velocity.tools.generic
Class ListTool