Skip to content

support cascading merge operation [SPR-4982] #9658

Closed

Description

@spring-projects-issues

tony kerz opened SPR-4982 and commented

support cascading merge operation, as suggested here:

currently the merge operation will not effect the nested map under "key_2"...

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
<bean id="map.abstract" class="org.springframework.beans.factory.config.MapFactoryBean">
<property name="sourceMap">
<map>
<entry key="key_1" value="value_1" />
<entry key="key_2">
<map>
<entry key="key_2_1" value="value_2_1" />
</map>
</entry>
</map>
</property>
</bean>
<bean id="map.concrete" parent="map.abstract">
<property name="sourceMap">
<map merge="true">
<entry key="key_1" value="value_1_new" />
<entry key="key_2">
<map merge="true">
<entry key="key_2_2" value="value_2_2" />
</map>
</entry>
<entry key="key_3" value="value_3" />
</map>
</property>
</bean>
</beans>


Issue Links:

Activity

  1. spring-projects-issues commented on Apr 3, 2011

    @spring-projects-issues
    CollaboratorAuthor

    Chris Beams commented

    Duplicates #11189

  2. added
    type: enhancement
    in: core
    status: duplicate
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: corestatus: duplicatetype: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions