ServiceSupport的类移动到support子包下。
This commit is contained in:
@@ -175,12 +175,11 @@ public class PropertiesUtils {
|
|||||||
}
|
}
|
||||||
String value = properties.getProperty(key);
|
String value = properties.getProperty(key);
|
||||||
if (value != null){
|
if (value != null){
|
||||||
// 支持嵌套取值的问题 key=${xx}/yy
|
|
||||||
Matcher m = p1.matcher(value);
|
Matcher m = p1.matcher(value);
|
||||||
while(m.find()) {
|
while(m.find()) {
|
||||||
String g = m.group();
|
String g = m.group();
|
||||||
String keyChild = g.replaceAll("\\$\\{", "").replaceAll("\\}", "");
|
String childKey = g.replaceAll("\\$\\{|\\}", "");
|
||||||
value = StringUtils.replace(value, g, getProperty(keyChild));
|
value = StringUtils.replace(value, g, getProperty(childKey));
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user