纯java实现spring时加载bean

来源:互联网 发布:wps办公软件好用吗 编辑:程序博客网 时间:2024/06/05 22:39

BeanFactory applicationContext = new ClassPathXmlApplicationContext(“beans.xml”);


UserService service = (UserService)applicationContext.getBean("userService")