public final class HerodotusRequestMatcher extends Object implements org.springframework.security.web.util.matcher.RequestMatcher, Serializable
Description: 自定义 AntPathRequestMatcher
基于 AntPathRequestMatcher 代码,扩展了一些方法,解决原有 AntPathRequestMatcher 使用不方便问题。
| 构造器和说明 |
|---|
HerodotusRequestMatcher() |
HerodotusRequestMatcher(String pattern)
Creates a matcher with the specific pattern which will match all HTTP methods in a
case sensitive manner.
|
HerodotusRequestMatcher(String pattern,
String httpMethod)
Creates a matcher with the supplied pattern and HTTP method in a case sensitive
manner.
|
HerodotusRequestMatcher(String pattern,
String httpMethod,
boolean caseSensitive)
Creates a matcher with the supplied pattern which will match the specified Http
method
|
HerodotusRequestMatcher(String pattern,
String httpMethod,
boolean caseSensitive,
org.springframework.web.util.UrlPathHelper urlPathHelper)
Creates a matcher with the supplied pattern which will match the specified Http
method
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o) |
String |
getHttpMethod() |
String |
getPattern() |
int |
hashCode() |
boolean |
isHasWildcard() |
boolean |
matches(HerodotusRequestMatcher requestMatcher) |
boolean |
matches(javax.servlet.http.HttpServletRequest request)
Returns true if the configured pattern (and HTTP-Method) match those of the
supplied request.
|
void |
setHttpMethod(String httpMethod) |
void |
setPattern(String pattern) |
String |
toString() |
public HerodotusRequestMatcher()
public HerodotusRequestMatcher(String pattern)
pattern - the ant pattern to use for matchingpublic HerodotusRequestMatcher(String pattern, String httpMethod)
pattern - the ant pattern to use for matchinghttpMethod - the HTTP method. The matches method will return false if
the incoming request doesn't have the same method.public HerodotusRequestMatcher(String pattern, String httpMethod, boolean caseSensitive)
pattern - the ant pattern to use for matchinghttpMethod - the HTTP method. The matches method will return false if
the incoming request doesn't doesn't have the same method.caseSensitive - true if the matcher should consider case, else falsepublic HerodotusRequestMatcher(String pattern, String httpMethod, boolean caseSensitive, org.springframework.web.util.UrlPathHelper urlPathHelper)
pattern - the ant pattern to use for matchinghttpMethod - the HTTP method. The matches method will return false if
the incoming request doesn't have the same method.caseSensitive - true if the matcher should consider case, else falseurlPathHelper - if non-null, will be used for extracting the path from the
HttpServletRequestpublic boolean matches(javax.servlet.http.HttpServletRequest request)
matches 在接口中 org.springframework.security.web.util.matcher.RequestMatcherrequest - the request to match against. The ant pattern will be matched
against the servletPath + pathInfo of the request.public boolean matches(HerodotusRequestMatcher requestMatcher)
public String getPattern()
public void setPattern(String pattern)
public String getHttpMethod()
public void setHttpMethod(String httpMethod)
public boolean isHasWildcard()
Copyright © 2023 Dromara. All rights reserved.