ServletContext context = config.getServletContext();
ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context);
ctx.getBean("beanName");
ServletContext context = config.getServletContext();
ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context);
ctx.getBean("beanName");