ServletContext sc = req.getSession().getServletContext();
XmlWebApplicationContext cxt = (XmlWebApplicationContext) WebApplicationContextUtils.findWebApplicationContext(sc);
AppVerService appVerServiceImpl = (AppVerService) cxt.getBean("appVerServiceImpl");
在Servlet的Filter中获取Spring注入的Bean
最新推荐文章于 2020-12-08 13:02:18 发布