类 FreemarkerUtils

java.lang.Object
org.tio.utils.freemarker.FreemarkerUtils

public class FreemarkerUtils extends Object
这个代码在不违背开源协议的前提下摘自:https://gitee.com/sanluan/PublicCMS-preview/blob/master/publiccms-parent/publiccms-common/src/main/java/com/publiccms/common/tools/FreeMarkerUtils.java 感谢publiccms作者张向东同志^_^
作者:
tanyaowu 2017年11月13日 下午3:09:21
  • 字段详细资料

  • 构造器详细资料

    • FreemarkerUtils

      public FreemarkerUtils()
  • 方法详细资料

    • generateFileByFile

      public static void generateFileByFile(String templateFilePath, String destFilePath, freemarker.template.Configuration configuration, Object model) throws IOException, freemarker.template.TemplateException
      参数:
      templateFilePath -
      destFilePath -
      configuration -
      model -
      抛出:
      IOException
      freemarker.template.TemplateException
    • generateFileByFile

      public 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 -
      抛出:
      IOException
      freemarker.template.TemplateException
    • generateFileByFile

      public 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.ParseException
      freemarker.template.MalformedTemplateNameException
      IOException
      freemarker.template.TemplateException
    • generateStringByPath

      public static String generateStringByPath(String template, freemarker.template.Configuration configuration) throws IOException, freemarker.template.TemplateException
      参数:
      template -
      configuration -
      返回:
      render result
      抛出:
      freemarker.template.TemplateException
      IOException
    • generateStringByPath

      public static String generateStringByPath(String template, freemarker.template.Configuration configuration, Object model) throws IOException, freemarker.template.TemplateException
      参数:
      template -
      configuration -
      model -
      返回:
      render result
      抛出:
      IOException
      freemarker.template.TemplateException
    • generateStringByPath

      public 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.TemplateNotFoundException
      freemarker.template.MalformedTemplateNameException
      freemarker.core.ParseException
      IOException
      freemarker.template.TemplateException
    • generateStringByString

      public static String generateStringByString(String templateContent, freemarker.template.Configuration configuration, Object model) throws IOException, freemarker.template.TemplateException
      参数:
      templateContent -
      configuration -
      model -
      返回:
      render result
      抛出:
      IOException
      freemarker.template.TemplateException