读书人

spring获取目前已启动容器

发布时间: 2012-09-18 16:21:42 作者: rapoo

spring获取当前已启动容器

WebApplicationContext context = ContextLoader.getCurrentWebApplicationContext();IService service = (IService) context.getBean("service");
?

读书人网 >软件架构设计

热点推荐