Example usage for org.springframework.beans.factory.support ManagedProperties merge

List of usage examples for org.springframework.beans.factory.support ManagedProperties merge

Introduction

In this page you can find the example usage for org.springframework.beans.factory.support ManagedProperties merge.

Prototype

@Override
    public Object merge(@Nullable Object parent) 

Source Link

Usage

From source file:org.cloudfoundry.reconfiguration.util.StandardPropertyAugmenter.java

@Override
public void augment(ConfigurableListableBeanFactory beanFactory, Class<?> beanClass, String key,
        ManagedProperties additionalProperties) {
    additionalProperties.setMergeEnabled(true);

    for (String beanName : beanFactory.getBeanNamesForType(beanClass, true, false)) {
        MutablePropertyValues propertyValues = getBeanDefinition(beanFactory, beanName).getPropertyValues();
        Properties originalValue = extractOriginalValue(beanFactory, propertyValues.getPropertyValue(key));

        propertyValues.addPropertyValue(key, additionalProperties.merge(originalValue));
    }//from  w w  w. j a  v a 2  s. co  m
}