类 HerodotusRequestMatcher

java.lang.Object
cn.herodotus.engine.oauth2.authorization.definition.HerodotusRequestMatcher
所有已实现的接口:
Serializable, org.springframework.security.web.util.matcher.RequestMatcher

public final class HerodotusRequestMatcher extends Object implements org.springframework.security.web.util.matcher.RequestMatcher, Serializable

Description: 自定义 AntPathRequestMatcher

基于 AntPathRequestMatcher 代码,扩展了一些方法,解决原有 AntPathRequestMatcher 使用不方便问题。

作者:
: gengwei.zheng
另请参阅:
Date:
: 2022/3/9 10:47
  • 构造器详细资料

    • HerodotusRequestMatcher

      public HerodotusRequestMatcher()
    • HerodotusRequestMatcher

      public HerodotusRequestMatcher(String pattern)
      Creates a matcher with the specific pattern which will match all HTTP methods in a case sensitive manner.
      参数:
      pattern - the ant pattern to use for matching
    • HerodotusRequestMatcher

      public HerodotusRequestMatcher(HerodotusRequest request)
    • HerodotusRequestMatcher

      public HerodotusRequestMatcher(String pattern, String httpMethod)
      Creates a matcher with the supplied pattern and HTTP method in a case sensitive manner.
      参数:
      pattern - the ant pattern to use for matching
      httpMethod - the HTTP method. The matches method will return false if the incoming request doesn't have the same method.
    • HerodotusRequestMatcher

      public HerodotusRequestMatcher(String pattern, String httpMethod, boolean caseSensitive)
      Creates a matcher with the supplied pattern which will match the specified Http method
      参数:
      pattern - the ant pattern to use for matching
      httpMethod - 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 false
    • HerodotusRequestMatcher

      public 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
      参数:
      pattern - the ant pattern to use for matching
      httpMethod - 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 false
      urlPathHelper - if non-null, will be used for extracting the path from the HttpServletRequest
  • 方法详细资料

    • matches

      public boolean matches(jakarta.servlet.http.HttpServletRequest request)
      Returns true if the configured pattern (and HTTP-Method) match those of the supplied request.
      指定者:
      matches 在接口中 org.springframework.security.web.util.matcher.RequestMatcher
      参数:
      request - the request to match against. The ant pattern will be matched against the servletPath + pathInfo of the request.
    • matches

      public boolean matches(HerodotusRequest request)
    • getPattern

      public String getPattern()
    • setPattern

      public void setPattern(String pattern)
    • getHttpMethod

      public String getHttpMethod()
    • setHttpMethod

      public void setHttpMethod(String httpMethod)
    • isHasWildcard

      public boolean isHasWildcard()
    • equals

      public boolean equals(Object o)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object