/** * Expands the given value, resolving any ${} placeholders using the property defaults. * * @param val * the value to expand * @return the expanded value */ public String resolveValue(String val) { Properties props = new Properties(); if(propertyDefaults != null) { for( Object key : propertyDefaults.keySet()) { props.setProperty((String)key, propertyDefaults.getProperty((String)key)); } } if(encryptedPropertyDefaults != null) { for( Object key : encryptedPropertyDefaults.keySet()) { props.setProperty((String)key, encryptedPropertyDefaults.getProperty((String)key)); } } return replacePlaceholders(val, props); }
if (value != null) value = this.defaultResolver.resolveValue(value);
if (value != null) value = this.defaultResolver.resolveValue(value);
/** * Expands the given value, resolving any ${} placeholders using the property defaults. * * @param val * the value to expand * @return the expanded value */ public String resolveValue(String val) { Properties props = new Properties(); if(propertyDefaults != null) { for( Object key : propertyDefaults.keySet()) { props.setProperty((String)key, propertyDefaults.getProperty((String)key)); } } if(encryptedPropertyDefaults != null) { for( Object key : encryptedPropertyDefaults.keySet()) { props.setProperty((String)key, encryptedPropertyDefaults.getProperty((String)key)); } } return replacePlaceholders(val, props); }