Class PathMatchConfigurer

  • java.lang.Object
    • org.springframework.web.reactive.config.PathMatchConfigurer

  • public class PathMatchConfigurer
    extends java.lang.Object
    Assist with configuring HandlerMapping's with path matching options.
    Rossen Stoyanchev, Brian Clozel
    • Constructor Detail

      • PathMatchConfigurer

        public PathMatchConfigurer()
    • Method Detail

      • setUseCaseSensitiveMatch

        public PathMatchConfigurer setUseCaseSensitiveMatch(java.lang.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(java.lang.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(java.lang.String prefix,
                                                 java.util.function.Predicate<java.lang.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 path prefix to apply
        predicate - a predicate for matching controller types
      • isUseTrailingSlashMatch

        protected java.lang.Boolean isUseTrailingSlashMatch()
      • isUseCaseSensitiveMatch

        protected java.lang.Boolean isUseCaseSensitiveMatch()
      • getPathPrefixes

        protected java.util.Map<java.lang.String,java.util.function.Predicate<java.lang.Class<?>>> getPathPrefixes()