普通java类获取spring的bean
获取ApplicationContext.xml中的bean
BeanFactory factory = new ClassPathXmlApplicationContext("classpath:/applicationContext*.xml"); ITestService testService = (ITestService)factory.getBean("testService"); ?
发布时间: 2012-09-19 13:43:54 作者: rapoo
普通java类获取spring的bean
获取ApplicationContext.xml中的bean
BeanFactory factory = new ClassPathXmlApplicationContext("classpath:/applicationContext*.xml"); ITestService testService = (ITestService)factory.getBean("testService"); ?