1.controller中获得webIoC容器
ServletContext context = request.getSession().getServletContext(); WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context); ctx.getBean("menuTreeDao");
1.controller中获得webIoC容器
ServletContext context = request.getSession().getServletContext(); WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context); ctx.getBean("menuTreeDao");