类 SaTokenContextUtil

java.lang.Object
cn.dev33.satoken.loveqq.boot.utils.SaTokenContextUtil

public class SaTokenContextUtil extends Object
SaTokenContext 上下文读写工具类
从以下版本开始:
1.42.0
作者:
click33
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static void
    clearContext(cn.dev33.satoken.context.model.SaTokenContextModelBox prev)
    清除当前上下文 并恢复之前的上下文,以支持 loveqq-framework 的 servlet/reactor 的统一配置
    static cn.dev33.satoken.context.model.SaTokenContextModelBox
    获取当前 ModelBox
    static com.kfyty.loveqq.framework.web.core.http.ServerRequest
    获取当前 Request
    static com.kfyty.loveqq.framework.web.core.http.ServerResponse
    获取当前 Response
    static cn.dev33.satoken.context.model.SaTokenContextModelBox
    setContext(com.kfyty.loveqq.framework.web.core.http.ServerRequest request, com.kfyty.loveqq.framework.web.core.http.ServerResponse response)
    写入当前上下文 并返回当前的上下文,以支持 loveqq-framework 的 servlet/reactor 的统一配置
    static void
    setContext(com.kfyty.loveqq.framework.web.core.http.ServerRequest request, com.kfyty.loveqq.framework.web.core.http.ServerResponse response, cn.dev33.satoken.fun.SaFunction fun)
    写入上下文对象, 并在执行函数后将其清除
    static <T> T
    setContext(com.kfyty.loveqq.framework.web.core.http.ServerRequest request, com.kfyty.loveqq.framework.web.core.http.ServerResponse response, cn.dev33.satoken.fun.SaRetGenericFunction<T> fun)
    写入上下文对象, 并在执行函数后将其清除

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • SaTokenContextUtil

      public SaTokenContextUtil()
  • 方法详细资料

    • setContext

      public static cn.dev33.satoken.context.model.SaTokenContextModelBox setContext(com.kfyty.loveqq.framework.web.core.http.ServerRequest request, com.kfyty.loveqq.framework.web.core.http.ServerResponse response)
      写入当前上下文 并返回当前的上下文,以支持 loveqq-framework 的 servlet/reactor 的统一配置
      参数:
      request - /
      response - /
    • setContext

      public static void setContext(com.kfyty.loveqq.framework.web.core.http.ServerRequest request, com.kfyty.loveqq.framework.web.core.http.ServerResponse response, cn.dev33.satoken.fun.SaFunction fun)
      写入上下文对象, 并在执行函数后将其清除
      参数:
      request - /
      response - /
      fun - /
    • setContext

      public static <T> T setContext(com.kfyty.loveqq.framework.web.core.http.ServerRequest request, com.kfyty.loveqq.framework.web.core.http.ServerResponse response, cn.dev33.satoken.fun.SaRetGenericFunction<T> fun)
      写入上下文对象, 并在执行函数后将其清除
      类型参数:
      T - /
      参数:
      request - /
      response - /
      fun - /
      返回:
      /
    • clearContext

      public static void clearContext(cn.dev33.satoken.context.model.SaTokenContextModelBox prev)
      清除当前上下文 并恢复之前的上下文,以支持 loveqq-framework 的 servlet/reactor 的统一配置
    • getModelBox

      public static cn.dev33.satoken.context.model.SaTokenContextModelBox getModelBox()
      获取当前 ModelBox
      返回:
      /
    • getRequest

      public static com.kfyty.loveqq.framework.web.core.http.ServerRequest getRequest()
      获取当前 Request
      返回:
      /
    • getResponse

      public static com.kfyty.loveqq.framework.web.core.http.ServerResponse getResponse()
      获取当前 Response
      返回:
      /