code: private static void merge() {
          Set<String> keySet = props.keySet();
          for (Property property: props.values()){
              for (String key: keySet){
                  if(!key.equals(property.getName())){
                      String val = property.getValue();
                      if(val.contains("${" + key + "}")){
                          property.setValue(val.replaceAll("\\$\\{" + key + "\\}", p(key)));
                      }
                  }
              }
          }
      }
docs: Will merge defined values into placeholders like ${placeholder}