类 PathMatchConfigurer

java.lang.Object
cn.taketoday.web.config.PathMatchConfigurer

public class PathMatchConfigurer extends Object
Assist with configuring HandlerMapping's with path matching options.
从以下版本开始:
4.0 2022/1/19 20:41
作者:
Rossen Stoyanchev, Brian Clozel, Harry Yang
  • 字段详细资料

    • trailingSlashMatch

      @Nullable private Boolean trailingSlashMatch
    • caseSensitiveMatch

      @Nullable private Boolean caseSensitiveMatch
    • pathPrefixes

      @Nullable private Map<String,Predicate<Class<?>>> pathPrefixes
  • 构造器详细资料

    • PathMatchConfigurer

      public PathMatchConfigurer()
  • 方法详细资料

    • setUseCaseSensitiveMatch

      public PathMatchConfigurer setUseCaseSensitiveMatch(@Nullable Boolean caseSensitiveMatch)
      Whether to match to URLs irrespective of their case. If enabled a method mapped to "/users" won't match to "/Users/".

      The default value is false.

    • setUseTrailingSlashMatch

      public PathMatchConfigurer setUseTrailingSlashMatch(@Nullable Boolean trailingSlashMatch)
      Whether to match to URLs irrespective of the presence of a trailing slash. If enabled a method mapped to "/users" also matches to "/users/".

      The default value is true.

    • addPathPrefix

      public PathMatchConfigurer addPathPrefix(String prefix, Predicate<Class<?>> predicate)
      Configure a path prefix to apply to matching controller methods.

      Prefixes are used to enrich the mappings of every @RequestMapping method whose controller type is matched by the corresponding Predicate. The prefix for the first matching predicate is used.

      Consider using HandlerTypePredicate to group controllers.

      参数:
      prefix - the prefix to apply
      predicate - a predicate for matching controller types
    • getPathPrefixes

      @Nullable protected Map<String,Predicate<Class<?>>> getPathPrefixes()
    • isUseTrailingSlashMatch

      @Nullable public Boolean isUseTrailingSlashMatch()
    • isUseCaseSensitiveMatch

      @Nullable public Boolean isUseCaseSensitiveMatch()