首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

Spring 流入 List Set Properties Map

2013-03-16 
Spring 注入 ListSetPropertiesMap要抓住主要矛盾,最主要的配置如下:package com.myapp.core.collectioni

Spring 注入 List Set Properties Map

要抓住主要矛盾,最主要的配置如下:

package com.myapp.core.collection;import org.springframework.context.ApplicationContext;import org.springframework.context.support.ClassPathXmlApplicationContext;public class TestMain {   public static void main(String[] args) {   ApplicationContext   context = new  ClassPathXmlApplicationContext("SpringBeans.xml");      Customer  customer = (Customer)context.getBean("customerBean");        System.out.println(customer.toString());   }}

运行结果如下:

[3[ name:  top  address: beijing  age:1][ name:  myList  address: myaddress  age:24]]
[[3, [ name:  top  address: beijing  age:1], [ name:  myList  address: myaddress  age:24]]]
[example1:love1example2:[ name:  top  address: beijing  age:1]example3:[ name:  myList  address: myaddress  age:24]]
[{key2=myexample--value2, key1=myexample--value1}]



热点排行