示例#1
0
 public static String expandProperties(String text) {
   if (StringUtil.isEmptyOrSpaces(text)) return text;
   Properties props = MavenServerUtil.collectSystemProperties();
   for (Map.Entry<Object, Object> each : props.entrySet()) {
     Object val = each.getValue();
     text =
         text.replace(
             "${" + each.getKey() + "}",
             val instanceof CharSequence ? (CharSequence) val : val.toString());
   }
   return text;
 }