<
bean
id
="parent"
abstract
="true"
class
="......"
>
< property name ="someProperties" >
< props >
< prop key ="someKey1" > someProValue1 </ prop >
< prop key ="someKey2" > someProValue2 </ prop >
</ props >
</ property >
</ bean >
< bean id ="child" parent ="parent" class ="......" >
< property name ="someProperties" >
< props merge ="true" >
< prop key ="someKey2" > anotherProValue2 </ prop >
< prop key ="someKey3" > someProValue3 </ prop >
</ props >
</ property >
</ bean >
< property name ="someProperties" >
< props >
< prop key ="someKey1" > someProValue1 </ prop >
< prop key ="someKey2" > someProValue2 </ prop >
</ props >
</ property >
</ bean >
< bean id ="child" parent ="parent" class ="......" >
< property name ="someProperties" >
< props merge ="true" >
< prop key ="someKey2" > anotherProValue2 </ prop >
< prop key ="someKey3" > someProValue3 </ prop >
</ props >
</ property >
</ bean >
最后,child这个bean的peoperties属性值如下:
someKey1=someProValue
someKey2=anotherProValue2
someKey3=anotherProValue3