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{