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:
Rossen Stoyanchev
2017-08-01 13:35:21 +02:00
parent 4fc0ce1206
commit b1440b6816
7 changed files with 29 additions and 260 deletions

View File

@@ -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;
}

View File

@@ -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) {