現在在項目中需要使用 Session 集中管理方案,把用戶的 Session 數據存放到 Redis 服務器中,參照 memcached-cache-filter 和 Spring-Session,使用一個 filter 將用戶請求攔截,然后使用自己寫的 Session 管理替換服務器原有的 Session 管理,目前已經實現了基于 Redis 的 Session 管理。但是項目里有之前寫好的 HttpSesionListenr,在替換了服務器原有的 Session 管理之后,實現了 HttpSesionListenr 的監聽器不能使用了,請問要怎么解決現在的問題,讓監聽器能正常觸發?
1 回答

Smart貓小萌
TA貢獻1911條經驗 獲得超7個贊
HttpSessionEventPublisher它本身也是個普通的 Listener 是將 HttpSessionEvent 封裝成 HttpSessionCreatedEvent/HttpSessionDestroyedEvent 再發布出去的,Spring Security 的 Session-Concurrency-Control 好像是基于這個事件
- 1 回答
- 0 關注
- 91 瀏覽
添加回答
舉報
0/150
提交
取消