@Component public class BeetlService extends Object
| 构造器和说明 |
|---|
BeetlService() |
@Comment(value="\u6839\u636e\u6a21\u677f\u5185\u5bb9\u7f16\u8bd1\u83b7\u53d6HTML\u5185\u5bb9") public String getRenderHtmlByTemplate(String templateContent, Map<String,Object> dataMap) throws IOException
templateContent - 模板内容字符串,不能为空或空白字符dataMap - 数据绑定映射表,用于替换模板中的变量,可为空IOException - 当读取模板资源发生IO异常时抛出@Comment(value="\u6839\u636e\u6a21\u677f\u6587\u4ef6\u8f93\u51fa\u7ed3\u679c") public String getRenderHtmlByFile(String templatePath, Map<String,Object> dataMap) throws IOException
templatePath - 模板文件相对路径(相对于配置的beetl模板根目录)dataMap - 数据绑定映射表,用于替换模板中的变量,可为空IOException - 当读取模板文件发生IO异常时抛出Copyright © 2026. All rights reserved.