Class ThymeleafTemplate
java.lang.Object
org.miaixz.bus.extra.template.provider.thymeleaf.ThymeleafTemplate
- All Implemented Interfaces:
Serializable,Template
Thymeleaf模板实现
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionThymeleafTemplate(org.thymeleaf.TemplateEngine engine, String template, Charset charset) 构造 -
Method Summary
Modifier and TypeMethodDescriptionvoidrender(Map<?, ?> bindingMap, OutputStream out) 将模板与绑定参数融合后输出到流void将模板与绑定参数融合后输出到Writerstatic ThymeleafTemplate包装Thymeleaf模板
-
Constructor Details
-
ThymeleafTemplate
构造- Parameters:
engine- Thymeleaf的模板对象TemplateEnginetemplate- 模板路径或模板内容charset- 编码
-
-
Method Details
-
wrap
public static ThymeleafTemplate wrap(org.thymeleaf.TemplateEngine engine, String template, Charset charset) 包装Thymeleaf模板- Parameters:
engine- Thymeleaf的模板引擎对象TemplateEnginetemplate- 模板路径或模板内容charset- 编码- Returns:
ThymeleafTemplate
-
render
Description copied from interface:Template将模板与绑定参数融合后输出到Writer -
render
Description copied from interface:Template将模板与绑定参数融合后输出到流
-