请问如何解决以下的问题,让监听器正常触发呢?

现在在项目中需要使用 Session 集中管理方案,把用户的 Session 数据存放到 Redis 服务器中,参照 memcached-cache-filter 和 Spring-Session,使用一个 filter 将用户请求拦截,然后使用自己写的 Session 管理替换服务器原有的 Session 管理,目前已经实现了基于 Redis 的 Session 管理。但是项目里有之前写好的 HttpSesionListenr,在替换了服务器原有的 Session 管理之后,实现了 HttpSesionListenr 的监听器不能使用了,请问要怎么解决现在的问题,让监听器能正常触发?

互换的青春
浏览 81回答 1
1回答

Smart猫小萌

 HttpSessionEventPublisher它本身也是个普通的 Listener 是将 HttpSessionEvent 封装成 HttpSessionCreatedEvent/HttpSessionDestroyedEvent 再发布出去的,Spring Security 的 Session-Concurrency-Control 好像是基于这个事件
打开App,查看更多内容
随时随地看视频慕课网APP