Skip to content

Instantly share code, notes, and snippets.

@framon
Created September 17, 2014 11:35
Show Gist options
  • Save framon/f943c11c62a2271009f4 to your computer and use it in GitHub Desktop.
Save framon/f943c11c62a2271009f4 to your computer and use it in GitHub Desktop.
Spring merge props with parent
<beans>
<bean id="parent" abstract="true" class="example.ComplexObject">
<property name="adminEmails">
<props>
<prop key="administrator">[email protected]</prop>
<prop key="support">[email protected]</prop>
</props>
</property>
</bean>
<bean id="child" parent="parent">
<property name="adminEmails">
<!-- the merge is specified on the child collection definition -->
<props merge="true">
<prop key="sales">[email protected]</prop>
<prop key="support">[email protected]</prop>
</props>
</property>
</bean>
<beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment