<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"); 获取