application.xml中配置list

<bean id="schedServers" class="java.util.ArrayList"> 
	  <constructor-arg> 
	   <list> 
	    <value>xx.xx.xx.x:8899</value>
	    <!-- <value>localhost:8899</value> -->
	   </list> 
	  </constructor-arg> 
	</bean>

使用

WebApplicationContext wc = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
wc.getBean("schedServers");
获取

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念