From 10e7baa995ef5d16e7f85914b7ac21f798be741c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=82=E6=A2=A6=E6=8A=80=E6=9C=AF?= <596392912@qq.com> Date: Thu, 12 Sep 2024 11:19:58 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/springblade/core/tool/utils/TemplateUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blade-core-tool/src/main/java/org/springblade/core/tool/utils/TemplateUtil.java b/blade-core-tool/src/main/java/org/springblade/core/tool/utils/TemplateUtil.java index 9e1ceed..6fb7b4f 100644 --- a/blade-core-tool/src/main/java/org/springblade/core/tool/utils/TemplateUtil.java +++ b/blade-core-tool/src/main/java/org/springblade/core/tool/utils/TemplateUtil.java @@ -40,7 +40,7 @@ public class TemplateUtil { */ public static String process(String template, Kv params) { Matcher matcher = pattern.matcher(template); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); while (matcher.find()) { String key = matcher.group(1) != null ? matcher.group(1) : matcher.group(2); String replacement = params.getStr(key); @@ -62,7 +62,7 @@ public class TemplateUtil { */ public static String safeProcess(String template, Kv params) { Matcher matcher = pattern.matcher(template); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); while (matcher.find()) { String key = matcher.group(1) != null ? matcher.group(1) : matcher.group(2); String replacement = params.getStr(key);