I have such bean declaration:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans SYSTEM "../schemas/spring-beans.dtd">
<beans>
<import resource="container-*.xml" />
<bean id="containerCodeStore" class="com.mycompany.ntd.crm.xxx2.container.InMemoryContainerCodeStore">
<property name="containers">
<map>
<entry key="WORKER-ONE" value-ref="workerOneContainer" />
<entry key="WORKER-TWO" value-ref="workerTwoContainer" />
</map>
</property>
</bean>
</beans>
where beans workerOneContainer
and workerTwoContainer
declared in container-worker-one.xml
and container-worker-two.xml
something like this:
<bean id="workerOneContainer" class="com.mycompany.ntd.crm.xxx.container.workerone.WorkerOneContainer">
<property name="name" value="WORKER-ONE" />
...
</bean>
Now it is necessary to reduce map declaration, so containers put into map itself - due to it own declaration. In other words needs to spread map declaration out into containers bean declaration.