AbstractApplicationContext cxt = new ClassPathXmlApplicationContext("*.xml");
ApplicationContext cxt=new ClassPathXmlApplicationContext(new String[]{"*.xml"});PerService perService = (PerService)cxt .getBean("perService");
原文:http://www.cnblogs.com/mgzy/p/3904913.html