类 SaTokenContextForSpring

java.lang.Object
cn.dev33.satoken.spring.SaTokenContextForSpring
所有已实现的接口:
cn.dev33.satoken.context.SaTokenContext

public class SaTokenContextForSpring extends Object implements cn.dev33.satoken.context.SaTokenContext
Sa-Token 上下文处理器 [ SpringMVC版本实现 ]。在 SpringMVC、SpringBoot 中使用 Sa-Token 时,必须注入此实现类,否则会出现上下文无效异常
从以下版本开始:
1.19.0
作者:
click33
  • 构造器详细资料

    • SaTokenContextForSpring

      public SaTokenContextForSpring()
  • 方法详细资料

    • getRequest

      public cn.dev33.satoken.context.model.SaRequest getRequest()
      获取当前请求的 Request 包装对象
      指定者:
      getRequest 在接口中 cn.dev33.satoken.context.SaTokenContext
    • getResponse

      public cn.dev33.satoken.context.model.SaResponse getResponse()
      获取当前请求的 Response 包装对象
      指定者:
      getResponse 在接口中 cn.dev33.satoken.context.SaTokenContext
    • getStorage

      public cn.dev33.satoken.context.model.SaStorage getStorage()
      获取当前请求的 Storage 包装对象
      指定者:
      getStorage 在接口中 cn.dev33.satoken.context.SaTokenContext
    • matchPath

      public boolean matchPath(String pattern, String path)
      判断:指定路由匹配符是否可以匹配成功指定路径
      指定者:
      matchPath 在接口中 cn.dev33.satoken.context.SaTokenContext
    • isValid

      public boolean isValid()
      判断:在本次请求中,此上下文是否可用。
      指定者:
      isValid 在接口中 cn.dev33.satoken.context.SaTokenContext