摘要:
转自:http://www.cnblogs.com/shyy/archive/2011/09/29/2453057.html一、简单的用ApplicationContext做测试的话,获得Spring中定义的Bean实例(对象).可以用:ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");RegisterDAO registerDAO = (RegisterDAO)ac.getBean("RegisterDAO");如果是两个以上:App 阅读全文