类 FreeMarkerUtilImpl
java.lang.Object
com.mbap.util.freemarker.FreeMarkerUtilImpl
- 所有已实现的接口:
FreeMarkerUtil
FreeMarker工具类,提供合并模板和数据的功能。
- 作者:
- BW.Panda Dec 8, 2016
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明boolean把模板生成的信息放入指定的输出流中boolean使用模板生成文件process2Str(String templateName, Map<String, Object> dataModel) 合并模板和数据,并将结果以字符串形式返回。booleanprocessWeb(String templateName) 处理web请求booleanprocessWeb(String templateName, Map<String, Object> dataModel) 处理web请求void设置工具类的使用模式。 工具类的模式默认为Mode.RUN运行模式
-
字段详细资料
-
log
声明日志
-
-
构造器详细资料
-
FreeMarkerUtilImpl
FreeMarkerUtilImpl(freemarker.template.Configuration cfg) 构造函数- 参数:
cfg- 模板配置对象
-
-
方法详细资料
-
setMode
从接口复制的说明:FreeMarkerUtil设置工具类的使用模式。 工具类的模式默认为Mode.RUN运行模式- 指定者:
setMode在接口中FreeMarkerUtil- 参数:
mode- 使用模式- 另请参阅:
-
process
从接口复制的说明:FreeMarkerUtil使用模板生成文件- 指定者:
process在接口中FreeMarkerUtil- 参数:
templateName- 模板名称dataModel- 数据模型fullFileName- 要生成的文件的绝对路径。- 返回:
booleantrue-- 成功,false-- 失败
-
process
从接口复制的说明:FreeMarkerUtil把模板生成的信息放入指定的输出流中- 指定者:
process在接口中FreeMarkerUtil- 参数:
templateName- 模板名称dataModel- 数据模型out- 输出流- 返回:
booleantrue-- 成功,false-- 失败
-
processWeb
从接口复制的说明:FreeMarkerUtil处理web请求- 指定者:
processWeb在接口中FreeMarkerUtil- 参数:
templateName- 模板名, 无需增加后缀(.ftl)dataModel- 数据模型。 默认在模型中增加上下文路径对象bp- 返回:
booleantrue-- 成功,false-- 失败
-
processWeb
从接口复制的说明:FreeMarkerUtil处理web请求- 指定者:
processWeb在接口中FreeMarkerUtil- 参数:
templateName- 模板名, 无需增加后缀(.ftl)- 返回:
booleantrue-- 成功,false-- 失败
-
process2Str
从接口复制的说明:FreeMarkerUtil合并模板和数据,并将结果以字符串形式返回。- 指定者:
process2Str在接口中FreeMarkerUtil- 参数:
templateName- 模板名- 返回:
String
-