使用Spring Session Redis 共享Session 后如何监听Session的sessionDestroyed事件
老衲老啦 2016-06-14 12:13:33 SpringMVC+Redis的项目;用户登录后大量的信息缓存在Redis中;用户退出或者Session超时时;清除Redis中缓存的数据。
原本使用自定义Listener implements HttpSessionListener来监听sessionDestroyed事件 并清除Redis中的记录;现由于加了分布式部署 改用Spring Session Redis 来共享Session;Session共享是成功了,但是现在没办法监听sessionDestroyed事件了;看了网上有些说用Spring Security 来管理Session ;extends HttpSessionEventPublisher;搞了几天 没搞懂;求大神些帮帮忙 是否有其他方式可以监听 sessionDestroyed 或者Spring Security 来管理Session 该如何配置???