Class SaHolder

java.lang.Object
cn.dev33.satoken.context.SaHolder

public class SaHolder extends Object
Sa-Token 上下文持有类,你可以通过此类快速获取当前环境下的 SaRequest、SaResponse、SaStorage、SaApplication 对象。
Since:
1.18.0
Author:
click33
  • Constructor Details

    • SaHolder

      public SaHolder()
  • Method Details

    • getContext

      public static SaTokenContext getContext()
      获取当前请求的 SaTokenContext 上下文对象
      Returns:
      /
      See Also:
    • getRequest

      public static SaRequest getRequest()
      获取当前请求的 Request 包装对象
      Returns:
      /
      See Also:
    • getResponse

      public static SaResponse getResponse()
      获取当前请求的 Response 包装对象
      Returns:
      /
      See Also:
    • getStorage

      public static SaStorage getStorage()
      获取当前请求的 Storage 包装对象
      Returns:
      /
      See Also:
    • getApplication

      public static SaApplication getApplication()
      获取全局 SaApplication 对象
      Returns:
      /
      See Also: