【问题标题】:How to add Shiro SessionListener when Shiro is used with Spring and web filter?Shiro 与 Spring 和 web 过滤器一起使用时如何添加 Shiro SessionListener?
【发布时间】:2021-03-05 16:12:24
【问题描述】:

我想将会话侦听器 (org.apache.shiro.session.SessionListener) 添加到 SessionManager。正如我在使用 shiro web 时发现的那样,默认情况下SessionManager 的实现是ServletContainerSessionManager。但是,我没有找到在ServletContainerSessionManager 中添加监听器的任何方法。谁能说一下如何添加这个监听器?

【问题讨论】:

    标签: security shiro


    【解决方案1】:

    ServletContainerSessionManager 只是您的 Servlet 容器提供的会话管理的包装。如果您想使用 Shiro 的 SessionListner,您需要使用不同的 SessionManager 实现,例如 DefaultWebSessionManager

    【讨论】:

      猜你喜欢
      • 2014-02-06
      • 2019-01-04
      • 2018-06-07
      • 2012-08-28
      • 2018-01-25
      • 2018-06-17
      • 1970-01-01
      • 2014-02-19
      • 2012-07-01
      相关资源
      最近更新 更多