在编写freemaker的时候,时常会遇到有一些输出的值是非字符串类型的:

 

  • 日期

${data.date?string('yyyy-MM-dd')}



 

  • 数字

${data.num?string.number}