public class FreemarkerUtil extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
void |
fprint(Object dataModel,
String templateName,
File filePath) |
void |
fprint(Object dataModel,
String templateName,
String filePath) |
static FreemarkerUtil |
getInstance(String versionNo,
File templatePath) |
static FreemarkerUtil |
getInstance(String versionNo,
Object servletContext,
String templatePath) |
static FreemarkerUtil |
getInstance(String versionNo,
String templatePath) |
void |
sprint(Object dataModel,
String templateName) |
public static FreemarkerUtil getInstance(String versionNo, String templatePath)
versionNo - freemarker的版本号templatePath - 模版加载路径public static FreemarkerUtil getInstance(String versionNo, File templatePath) throws IOException
versionNo - freemarker的版本号templatePath - 模版加载路径IOExceptionpublic static FreemarkerUtil getInstance(String versionNo, Object servletContext, String templatePath) throws IOException
versionNo - 版本号servletContext - Servlet ContexttemplatePath - 模版加载路径IOExceptionpublic void sprint(Object dataModel, String templateName)
dataModel - 数据模型templateName - 输出模版public void fprint(Object dataModel, String templateName, String filePath)
dataModel - 数据模型templateName - 输出模版filePath - 输出文件路径Copyright © 2025. All rights reserved.