public class PathMatchConfigurer
extends java.lang.Object
HandlerMapping
's with path matching options.Constructor and Description |
---|
PathMatchConfigurer() |
Modifier and Type | Method and Description |
---|---|
PathMatchConfigurer |
addPathPrefix(java.lang.String prefix,
java.util.function.Predicate<java.lang.Class<?>> predicate)
Configure a path prefix to apply to matching controller methods.
|
protected java.util.Map<java.lang.String,java.util.function.Predicate<java.lang.Class<?>>> |
getPathPrefixes() |
protected java.lang.Boolean |
isUseCaseSensitiveMatch() |
protected java.lang.Boolean |
isUseTrailingSlashMatch() |
PathMatchConfigurer |
setUseCaseSensitiveMatch(java.lang.Boolean caseSensitiveMatch)
Whether to match to URLs irrespective of their case.
|
PathMatchConfigurer |
setUseTrailingSlashMatch(java.lang.Boolean trailingSlashMatch)
Whether to match to URLs irrespective of the presence of a trailing slash.
|
public PathMatchConfigurer setUseCaseSensitiveMatch(java.lang.Boolean caseSensitiveMatch)
The default value is false
.
public PathMatchConfigurer setUseTrailingSlashMatch(java.lang.Boolean trailingSlashMatch)
The default value is true
.
public PathMatchConfigurer addPathPrefix(java.lang.String prefix, java.util.function.Predicate<java.lang.Class<?>> predicate)
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 applypredicate
- a predicate for matching controller types@Nullable protected java.lang.Boolean isUseTrailingSlashMatch()
@Nullable protected java.lang.Boolean isUseCaseSensitiveMatch()
@Nullable protected java.util.Map<java.lang.String,java.util.function.Predicate<java.lang.Class<?>>> getPathPrefixes()