类 WebUtils

java.lang.Object
org.springframework.web.util.WebUtils
cn.herodotus.engine.oauth2.core.utils.WebUtils

public class WebUtils extends org.springframework.web.util.WebUtils

Description: Http与Servlet工具类.

作者:
: gengwei.zheng
Date:
: 2020/3/4 11:39
  • 字段概要

    从类继承的字段 org.springframework.web.util.WebUtils

    CONTENT_TYPE_CHARSET_PREFIX, DEFAULT_CHARACTER_ENCODING, DEFAULT_WEB_APP_ROOT_KEY, ERROR_EXCEPTION_ATTRIBUTE, ERROR_EXCEPTION_TYPE_ATTRIBUTE, ERROR_MESSAGE_ATTRIBUTE, ERROR_REQUEST_URI_ATTRIBUTE, ERROR_SERVLET_NAME_ATTRIBUTE, ERROR_STATUS_CODE_ATTRIBUTE, FORWARD_CONTEXT_PATH_ATTRIBUTE, FORWARD_PATH_INFO_ATTRIBUTE, FORWARD_QUERY_STRING_ATTRIBUTE, FORWARD_REQUEST_URI_ATTRIBUTE, FORWARD_SERVLET_PATH_ATTRIBUTE, HTML_ESCAPE_CONTEXT_PARAM, INCLUDE_CONTEXT_PATH_ATTRIBUTE, INCLUDE_PATH_INFO_ATTRIBUTE, INCLUDE_QUERY_STRING_ATTRIBUTE, INCLUDE_REQUEST_URI_ATTRIBUTE, INCLUDE_SERVLET_PATH_ATTRIBUTE, RESPONSE_ENCODED_HTML_ESCAPE_CONTEXT_PARAM, SESSION_MUTEX_ATTRIBUTE, SUBMIT_IMAGE_SUFFIXES, TEMP_DIR_CONTEXT_ATTRIBUTE, WEB_APP_ROOT_KEY_PARAM
  • 构造器概要

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

    修饰符和类型
    方法
    说明
    static boolean
    isRequestMatched(List<String> paths, jakarta.servlet.http.HttpServletRequest request)
    判断请求是否与设定的模式匹配
    static boolean
    isRequestMatched(org.springframework.security.web.util.matcher.RequestMatcher[] matchers, jakarta.servlet.http.HttpServletRequest request)
    判断请求是否与设定的模式匹配
    static void
    renderJson(jakarta.servlet.http.HttpServletResponse response, Object object)
    客户端返回JSON字符串
    static void
    renderJson(jakarta.servlet.http.HttpServletResponse response, String string, String type)
    客户端返回字符串
    static org.springframework.security.web.util.matcher.RequestMatcher[]
    将配置路径转换为 RequestMatcher 数组

    从类继承的方法 org.springframework.web.util.WebUtils

    clearErrorRequestAttributes, exposeErrorRequestAttributes, findParameterValue, findParameterValue, getCookie, getDefaultHtmlEscape, getNativeRequest, getNativeResponse, getParametersStartingWith, getRealPath, getRequiredSessionAttribute, getResponseEncodedHtmlEscape, getSessionAttribute, getSessionId, getSessionMutex, getTempDir, hasSubmitParameter, isIncludeRequest, isSameOrigin, isValidOrigin, parseMatrixVariables, removeWebAppRootSystemProperty, setSessionAttribute, setWebAppRootSystemProperty

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

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

    • WebUtils

      public WebUtils()
  • 方法详细资料

    • toRequestMatchers

      public static org.springframework.security.web.util.matcher.RequestMatcher[] toRequestMatchers(List<String> paths)
      将配置路径转换为 RequestMatcher 数组
      参数:
      paths - 静态请求路径
      返回:
      RequestMatcher 数组
    • isRequestMatched

      public static boolean isRequestMatched(org.springframework.security.web.util.matcher.RequestMatcher[] matchers, jakarta.servlet.http.HttpServletRequest request)
      判断请求是否与设定的模式匹配
      参数:
      matchers - 路径匹配模式
      request - 请求
      返回:
      是否匹配
    • isRequestMatched

      public static boolean isRequestMatched(List<String> paths, jakarta.servlet.http.HttpServletRequest request)
      判断请求是否与设定的模式匹配
      参数:
      paths - 路径
      request - 请求
      返回:
      是否匹配
    • renderJson

      public static void renderJson(jakarta.servlet.http.HttpServletResponse response, Object object)
      客户端返回JSON字符串
      参数:
      response - HttpServletResponse
      object - 需要转换的对象
    • renderJson

      public static void renderJson(jakarta.servlet.http.HttpServletResponse response, String string, String type)
      客户端返回字符串
      参数:
      response - HttpServletResponse
      string - 需要绘制的信息