1.spring容器注入bean
2.WebApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationConte(servletContext);
ServiceName serviceName = context.getBean("serviceName");
3.ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
ServiceName serviceName = context.getBean("serviceName");
6137

被折叠的 条评论
为什么被折叠?



