ServletContext servletContext = this.getServletContext();
WebApplicationContext ctx = WebApplicationContextUtils
.getWebApplicationContext(servletContext);
UserService userService= (UserService) ctx.getBean("userService");
WebApplicationContext ctx = WebApplicationContextUtils
.getWebApplicationContext(servletContext);
UserService userService= (UserService) ctx.getBean("userService");