spring在filter类里注解bean的几个写法

spring在filter类里注解bean的几个写法:

1. SpringContextHolder.getApplicationContext().getBean(RedisSimpleClient.class);

2.
ServletContext servletContext = this.getServletContext();  
WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(servletContext);
上一篇:ServletContext接口简介


下一篇:【JavaWeb】关于Servlet(1)