* @param properties the merged context properties
*/
public static void processProperties(final Properties properties,
String placeholderPrefix, String placeholderSuffix)
{
PropertyPlaceholderHelper helper = new PropertyPlaceholderHelper(
placeholderPrefix, placeholderSuffix);
PropertyPlaceholderHelper.PlaceholderResolver resolver = new PropertyPlaceholderHelper.PlaceholderResolver()
{
@Override
public String resolvePlaceholder(String placeholderName)
{
// SYSTEM_PROPERTIES_MODE_OVERRIDE means we look at previously set
// system properties in preference to properties defined in our file
String value = System.getProperty(placeholderName);
if (value == null)
value = properties.getProperty(placeholderName);
return value;
}
};
for (Object key : properties.keySet())
{
String propertyName = (String) key;
// get the value from the map
String propertyValue = properties.getProperty(propertyName);
// resolve it against system properties then other properties in the
// passed-in Properties
String resolvedValue = helper.replacePlaceholders(propertyValue,
resolver);
// set back into passed-in Properties if changed
if (!ObjectUtils.nullSafeEquals(propertyValue, resolvedValue))
{