...would fail. But the good news is: support for map configuration is has just been added to the trunk. So the above is perfectly valid if you happen to be using the version of the trunk.
<?xml version="1.0" encoding="UTF-8"?>
<beans>
<bean id="indexHolder" class="me.springframework.di.spring.CourseIndexHolder">
<property name="index">
<map>
<entry key="coding">
<bean class="me.springframework.di.spring.Course">
<property name="topic" value="C++"/>
</bean>
</entry>
<entry key="modeling">
<bean class="me.springframework.di.spring.Course">
<property name="topic" value="UML"/>
</bean>
</entry>
</map>
</property>
</bean>
</beans>
Note that it is already compliant with classic Spring in many ways. So it does allow you to use keys based on beans instead of String literals, as an example. (See SPRINGME-4.)
0 comments:
Post a Comment