Remove ParsingPathMatcher
Now that we also have RequestPath and PathContainer with the latter as the required input, the ParsingPathMatcher adapter can be removed.
This commit is contained in:
@@ -19,7 +19,6 @@ package org.springframework.web.servlet.config.annotation;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.PathMatcher;
|
||||
import org.springframework.web.util.UrlPathHelper;
|
||||
import org.springframework.web.util.pattern.ParsingPathMatcher;
|
||||
|
||||
/**
|
||||
* Helps with configuring HandlerMappings path matching options such as trailing
|
||||
@@ -136,11 +135,6 @@ public class PathMatchConfigurer {
|
||||
|
||||
@Nullable
|
||||
public PathMatcher getPathMatcher() {
|
||||
if (this.pathMatcher instanceof ParsingPathMatcher &&
|
||||
(Boolean.TRUE.equals(this.trailingSlashMatch) || Boolean.TRUE.equals(this.suffixPatternMatch))) {
|
||||
throw new IllegalStateException("When using a ParsingPathMatcher, useTrailingSlashMatch" +
|
||||
" and useSuffixPatternMatch should be set to 'false'.");
|
||||
}
|
||||
return this.pathMatcher;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,12 +55,6 @@ public interface WebMvcConfigurer {
|
||||
* <li>ViewControllerMappings</li>
|
||||
* <li>ResourcesMappings</li>
|
||||
* </ul>
|
||||
* <p>Note that if a {@link org.springframework.web.util.pattern.ParsingPathMatcher}
|
||||
* is configured here,
|
||||
* the {@link PathMatchConfigurer#setUseTrailingSlashMatch(Boolean)} and
|
||||
* {@link PathMatchConfigurer#setUseSuffixPatternMatch(Boolean)} options must be set
|
||||
* to {@literal false}as they can lead to illegal patterns,
|
||||
* see {@link org.springframework.web.util.pattern.ParsingPathMatcher}.
|
||||
* @since 4.0.3
|
||||
*/
|
||||
default void configurePathMatch(PathMatchConfigurer configurer) {
|
||||
|
||||
Reference in New Issue
Block a user