public class FreemarkerUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CHARSET |
| Constructor and Description |
|---|
FreemarkerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
generateFileByFile(String templateFilePath,
String destFilePath,
freemarker.template.Configuration configuration,
Object model) |
static void |
generateFileByFile(String templateFilePath,
String destFilePath,
freemarker.template.Configuration configuration,
Object model,
boolean override) |
static void |
generateFileByFile(String templateFilePath,
String destFilePath,
freemarker.template.Configuration configuration,
Object model,
boolean override,
boolean append) |
static String |
generateStringByPath(String template,
freemarker.template.Configuration configuration) |
static String |
generateStringByPath(String template,
freemarker.template.Configuration configuration,
Object model) |
static void |
generateStringByPath(Writer writer,
String template,
freemarker.template.Configuration configuration,
Object model) |
static String |
generateStringByString(String templateContent,
freemarker.template.Configuration configuration,
Object model) |
public static final String DEFAULT_CHARSET
public static void generateFileByFile(String templateFilePath, String destFilePath, freemarker.template.Configuration configuration, Object model) throws IOException, freemarker.template.TemplateException
templateFilePath - destFilePath - configuration - model - IOExceptionfreemarker.template.TemplateExceptionpublic static void generateFileByFile(String templateFilePath, String destFilePath, freemarker.template.Configuration configuration, Object model, boolean override) throws IOException, freemarker.template.TemplateException
templateFilePath - destFilePath - configuration - model - override - IOExceptionfreemarker.template.TemplateExceptionpublic static void generateFileByFile(String templateFilePath, String destFilePath, freemarker.template.Configuration configuration, Object model, boolean override, boolean append) throws freemarker.template.MalformedTemplateNameException, freemarker.core.ParseException, IOException, freemarker.template.TemplateException
templateFilePath - destFilePath - configuration - model - override - append - freemarker.core.ParseExceptionfreemarker.template.MalformedTemplateNameExceptionIOExceptionfreemarker.template.TemplateExceptionpublic static String generateStringByPath(String template, freemarker.template.Configuration configuration) throws IOException, freemarker.template.TemplateException
template - configuration - freemarker.template.TemplateExceptionIOExceptionpublic static String generateStringByPath(String template, freemarker.template.Configuration configuration, Object model) throws IOException, freemarker.template.TemplateException
template - configuration - model - IOExceptionfreemarker.template.TemplateExceptionpublic static void generateStringByPath(Writer writer, String template, freemarker.template.Configuration configuration, Object model) throws freemarker.template.TemplateNotFoundException, freemarker.template.MalformedTemplateNameException, freemarker.core.ParseException, IOException, freemarker.template.TemplateException
writer - template - configuration - model - freemarker.template.TemplateNotFoundExceptionfreemarker.template.MalformedTemplateNameExceptionfreemarker.core.ParseExceptionIOExceptionfreemarker.template.TemplateExceptionpublic static String generateStringByString(String templateContent, freemarker.template.Configuration configuration, Object model) throws IOException, freemarker.template.TemplateException
templateContent - configuration - model - IOExceptionfreemarker.template.TemplateExceptionCopyright © 2021. All rights reserved.