67,538
社区成员
发帖
与我相关
我的任务
分享
WebApplicationContext springCtx = WebApplicationContextUtils.getWebApplicationContext(servletContext);
Service service = (Service)springCtx.getBean("Service");
//如果你一定要直接访问Dao的话
Dao dao = (Dao)springCtx.getBean("Dao");