From 92f8cc8a922c5e67ff44f9fdaa8cfa548027211f Mon Sep 17 00:00:00 2001 From: thinkgem Date: Sat, 17 Nov 2018 21:45:13 +0800 Subject: [PATCH] =?UTF-8?q?ServiceSupport=E7=9A=84=E7=B1=BB=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E5=88=B0support=E5=AD=90=E5=8C=85=E4=B8=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/jeesite/common/io/PropertiesUtils.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/jeesite/common/io/PropertiesUtils.java b/common/src/main/java/com/jeesite/common/io/PropertiesUtils.java index 13cf25a8..b2b4a2a9 100644 --- a/common/src/main/java/com/jeesite/common/io/PropertiesUtils.java +++ b/common/src/main/java/com/jeesite/common/io/PropertiesUtils.java @@ -175,12 +175,11 @@ public class PropertiesUtils { } String value = properties.getProperty(key); if (value != null){ - // 支持嵌套取值的问题 key=${xx}/yy Matcher m = p1.matcher(value); while(m.find()) { String g = m.group(); - String keyChild = g.replaceAll("\\$\\{", "").replaceAll("\\}", ""); - value = StringUtils.replace(value, g, getProperty(keyChild)); + String childKey = g.replaceAll("\\$\\{|\\}", ""); + value = StringUtils.replace(value, g, getProperty(childKey)); } return value; }else{