public class FreeMarkerHelper extends Object
| Constructor and Description |
|---|
FreeMarkerHelper() |
| Modifier and Type | Method and Description |
|---|---|
static freemarker.template.Template |
getTemplate(String name) |
static String |
getTplContent(String templateName) |
static String |
process(String templateName,
Object model)
It's not the same as
getTplContent(String);
The content return by this method does not contain '\r' '\n' '\t' which is more "like" a SQL. |
static void |
process(String templateName,
Object model,
Writer writer) |
static void |
processTemplateIntoString(String tplPath,
Object model,
Writer writer) |
static String |
processTemplateIntoString(freemarker.template.Template template,
Object model) |
public static freemarker.template.Template getTemplate(String name)
public static String process(String templateName, Object model)
getTplContent(String);
The content return by this method does not contain '\r' '\n' '\t' which is more "like" a SQL.
But i do nothing about duplicate spaces, Because it's hard to separate useless spaces.templateName - public static void processTemplateIntoString(String tplPath, Object model, Writer writer)
public static String processTemplateIntoString(freemarker.template.Template template, Object model) throws IOException, freemarker.template.TemplateException
IOExceptionfreemarker.template.TemplateExceptionCopyright © 2020. All rights reserved.