Freemarker常用标签

一.获取当前日期时间

1.获取时间戳

${.now?string[“hhmmSSsss”]}

2.获取当前日期

${.now?date}

3.获取当前具体时间

${.now}

二.引用include

引用文件a.ftl
里面有标签 <#assign test=”hello world”>
b.ftl引用

<#include “a.ftl”>
${test}
输出:hello world

三.添加注释

<#– 这里是注释–>

猜你喜欢

转载自blog.csdn.net/u010520146/article/details/81187174