Properties of a bean can be replaced, removed, or prepended
and appended to, if they are collections. The following example
replaces the value specified for the "variables" property by the
parents in the inheritance hierarchy, by a new value (an empty
list).
<bean id="TextReplacer" extends="extends">
<property name="variables" combine="replace">
<list/>
</property>
</bean>
One can choose to remove the property value altogether, which
will result in its taking its default value. It will be as if no
value assignment was ever specified in the configuration.
<bean id="TextReplacer" extends="extends">
<property name="variables" combine="remove"/>
</bean>
If one wants to append or prepend elements to a collection,
while leaving the configured elements intact, there are two more
options for the "combine" property.
<bean id="TextReplacer1" extends="extends">
<property name="variables" combine="append">
<list>
<value>String 1</value>
<value>String 2</value>
</list>
</property>
</bean>
<bean id="TextReplacer2" extends="extends">
<property name="variables" combine="prepend">
<list>
<value>String 1</value>
<value>String 2</value>
</list>
</property>
</bean>
Thinking in terms of whole components, instead of beans, this
allows one to extend or override the particular values used in a
component configuration file in order to create a customized
instance of a component to use in a product or a deployment.