Red de conocimiento informático - Problemas con los teléfonos móviles - Cómo inyectar servicios a través de filtros en Springmvc

Cómo inyectar servicios a través de filtros en Springmvc

Contexto ServletContext = request.getSession().getServletContext();

ApplicationContext ctx = WebApplicationContextUtils

.getWebApplicationContext(contexto);

ArticleInfoService artículoinfoService = (ArticleInfoService) ctx

.getBean("yourServiceName");

Obtenga el contexto de la aplicación y cargue el Bean usted mismo.