Class TemplateKit

java.lang.Object
org.miaixz.bus.extra.template.TemplateKit

public class TemplateKit extends Object
提供模板工具类,用于快捷模板融合
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • TemplateKit

      public TemplateKit()
  • Method Details

    • getEngine

      public static TemplateProvider getEngine()
      获取单例的模板引擎
      Returns:
      TemplateProvider
    • render

      public static String render(String templateContent, Map<?,?> bindingMap)
      融合模板和参数,返回融合后的内容
      Parameters:
      templateContent - 模板内容
      bindingMap - 参数
      Returns:
      内容
    • render

      public static void render(String templateContent, Map<?,?> bindingMap, Writer writer)
      融合模板和参数,返回融合后的内容
      Parameters:
      templateContent - 模板内容
      bindingMap - 参数
      writer - 融合内容输出的位置