SpringMVC获取上下文

springMVC获取上下文工具类:

// spring上下文
WebApplicationContext ac1 = WebApplicationConetxtUtils.getWebApplicationConetext(request.getSession.getServletContext());

// springMVC上下文
WebApplicationContext ac1 = RequestConetxtUtils.getWebApplicationContextConetext(request);

 

posted @ 2017-08-29 14:43  iFindU_San  阅读(531)  评论(0)    收藏  举报