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