类 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 booleanisRequestMatched(List<String> paths, jakarta.servlet.http.HttpServletRequest request) 判断请求是否与设定的模式匹配static booleanisRequestMatched(org.springframework.security.web.util.matcher.RequestMatcher[] matchers, jakarta.servlet.http.HttpServletRequest request) 判断请求是否与设定的模式匹配static voidrenderJson(jakarta.servlet.http.HttpServletResponse response, Object object) 客户端返回JSON字符串static voidrenderJson(jakarta.servlet.http.HttpServletResponse response, String string, String type) 客户端返回字符串static org.springframework.security.web.util.matcher.RequestMatcher[]toRequestMatchers(List<String> paths) 将配置路径转换为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
-
构造器详细资料
-
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
客户端返回JSON字符串- 参数:
response- HttpServletResponseobject- 需要转换的对象
-
renderJson
public static void renderJson(jakarta.servlet.http.HttpServletResponse response, String string, String type) 客户端返回字符串- 参数:
response- HttpServletResponsestring- 需要绘制的信息
-