Person.java public class Person { private Long pid; private String pname; private Student student; private List list; private Set set; private Map map; private Properties properties; //get和set方法 } applicationContext.xml <?xml version="1.0" en
转自:http://www.sohu.com/a/115194552_466964 我们知道可以通过ApplicationContext的getBean方法来获取Spring容器中已初始化的bean.getBean一共有以下四种方法原型: l getBean(String name) l getBean(Class<T> type) l getBean(String name,Class<T> type) l getBean(String name,Object[] args) 下