List, Mapにおける Bean の指定
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd"> <beans> <bean id="bean1" class="net.tilfin.ClassA" scope="singleton"/> <bean id="bean2" class="net.tilfin.ClassA" scope="singleton"/> <bean id="beanList1" class="net.tilfin.List"> <property name="list"> <list> <ref local="bean1" /> <ref local="bean2" /> </list> </property> </bean> </beans>