web.xml:

context-param:contextConfigLocation:用于ContextLoaderListener
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext*.xml</param-value>
context-param:log4jConfigLocation:用于Log4jConfigListener
listener:ContextLoaderListener:启动Spring容器初始化
listener:Log4jConfigListener:初始化log4j
listener:org.springframework.security.ui.session.HttpSessionEventPublisher:貌似没用
每次HttpSession开始或者结束的时候,
web.xml中的HttpSessionEventPublisher都会发布一个 ApplicationEvent事件到Spring的ApplicationContext。
这是至关重要的,因为这个机制允许在session结束的时候,SessionRegistryImpl会得到通知。
这解释了为什么我们需要在ConcurrentSessionFilter中指向 SessionRegistryImpl的实例。