导入spring util名称空间。然后,你可以如下定义一个列表bean:
<?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-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd"><util:list id="myList" value-type="java.lang.String"> <value>foo</value> <value>bar</value></util:list>
值类型是要使用的泛型类型,并且是可选的。你也可以使用属性指定列表实现类
list-class。



