ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext())