SpringSecurity理解
SpringSecurity是一个能够为基于Spring的企业应用系统提供声明式的安全访问控制解决方案的安全框架。
SpringSecurity的前身是Acegi,一般来说,如果要对Web资源进行保护,最好的办法莫过于Filter,要想对方法调用进行保护,最好的办法莫过于AOP。Acegi对web资源的保护,就是靠Filter实现的。
一般来说,我们的Filter都是配置在web.xml中,但是Acegi不一样,它在web.xml中配置的只是一个代理,而真正起作用的Filter是作为Bean配置在Spring中的。web.xml中的代理依次调用这些Bean,就实现了对Web资源的保护,同时这些Filter作为Bean被Spring管理,所以实现AOP也很简单,真的是一举两得啊.
SpringSecurity3源码分析
web.xml中监听器:HttpSessionEventPublisher
<listener>
<listener-class>
org.springframework.security.web.session.HttpSessionEventPublisher