类 WebUtil

java.lang.Object
cn.sinozg.applet.common.utils.WebUtil

public class WebUtil extends Object
http 相关的
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    private static final org.slf4j.Logger
     
  • 构造器概要

    构造器
    限定符
    构造器
    说明
    private
     
  • 方法概要

    修饰符和类型
    方法
    说明
    private static org.springframework.web.context.request.ServletRequestAttributes
    ServletRequestAttributes
    static <T> T
    Attribute的值
    static String
    getBodyString(jakarta.servlet.ServletRequest request)
    获取到请求里的 body
    static String
    getDomain(jakarta.servlet.http.HttpServletRequest request)
    请求URL
    static String
    请求URL
    static jakarta.servlet.http.HttpServletRequest
    获取 HttpServletRequest
    static jakarta.servlet.http.HttpServletResponse
    获取 HttpServletResponse
    static void
    设置值到Attribute

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

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • log

      private static final org.slf4j.Logger log
  • 构造器详细资料

    • WebUtil

      private WebUtil()
  • 方法详细资料

    • request

      public static jakarta.servlet.http.HttpServletRequest request()
      获取 HttpServletRequest
      返回:
      HttpServletRequest
    • response

      public static jakarta.servlet.http.HttpServletResponse response()
      获取 HttpServletResponse
      返回:
      HttpServletResponse
    • getAttribute

      public static <T> T getAttribute(String name)
      Attribute的值
      类型参数:
      T - Attribute类型
      参数:
      name - name
      返回:
      Attribute的值
    • setAttribute

      public static void setAttribute(String name, Object o)
      设置值到Attribute
      参数:
      name - name
      o - 值
    • attributes

      private static org.springframework.web.context.request.ServletRequestAttributes attributes()
      ServletRequestAttributes
      返回:
      ServletRequestAttributes
    • getBodyString

      public static String getBodyString(jakarta.servlet.ServletRequest request)
      获取到请求里的 body
      参数:
      request - 请求
      返回:
      请求参数
    • getUrl

      public static String getUrl()
      请求URL
      返回:
      URL
    • getDomain

      public static String getDomain(jakarta.servlet.http.HttpServletRequest request)
      请求URL
      参数:
      request - HttpServletRequest
      返回:
      请求url