diff --git a/spring-web/src/main/java/org/springframework/web/cors/UrlBasedCorsConfigurationSource.java b/spring-web/src/main/java/org/springframework/web/cors/UrlBasedCorsConfigurationSource.java index a5843aaf8e0..f4c212544f5 100644 --- a/spring-web/src/main/java/org/springframework/web/cors/UrlBasedCorsConfigurationSource.java +++ b/spring-web/src/main/java/org/springframework/web/cors/UrlBasedCorsConfigurationSource.java @@ -19,11 +19,12 @@ package org.springframework.web.cors; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; + import javax.servlet.http.HttpServletRequest; +import org.springframework.util.AntPathMatcher; import org.springframework.util.Assert; import org.springframework.util.PathMatcher; -import org.springframework.web.util.ParsingPathMatcher; import org.springframework.web.util.UrlPathHelper; /** @@ -40,7 +41,7 @@ public class UrlBasedCorsConfigurationSource implements CorsConfigurationSource private final Map corsConfigurations = new LinkedHashMap<>(); - private PathMatcher pathMatcher = new ParsingPathMatcher(); + private PathMatcher pathMatcher = new AntPathMatcher(); private UrlPathHelper urlPathHelper = new UrlPathHelper(); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java index 1d18ad6cc5c..e927935005d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java @@ -17,15 +17,16 @@ package org.springframework.web.servlet; import java.io.IOException; + import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.springframework.util.AntPathMatcher; import org.springframework.util.PathMatcher; import org.springframework.util.StringUtils; import org.springframework.web.context.support.ServletContextResource; -import org.springframework.web.util.ParsingPathMatcher; /** * Simple servlet that can expose an internal resource, including a @@ -181,7 +182,7 @@ public class ResourceServlet extends HttpServletBean { * @see org.springframework.util.AntPathMatcher */ protected PathMatcher getPathMatcher() { - return new ParsingPathMatcher(); + return new AntPathMatcher(); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java index 85d5e30aced..1f83e3e6536 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; + import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; @@ -55,6 +56,7 @@ import org.springframework.http.converter.support.AllEncompassingFormHttpMessage import org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter; import org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter; import org.springframework.http.converter.xml.SourceHttpMessageConverter; +import org.springframework.util.AntPathMatcher; import org.springframework.util.ClassUtils; import org.springframework.util.PathMatcher; import org.springframework.validation.Errors; @@ -93,7 +95,6 @@ import org.springframework.web.servlet.resource.ResourceUrlProvider; import org.springframework.web.servlet.resource.ResourceUrlProviderExposingInterceptor; import org.springframework.web.servlet.view.InternalResourceViewResolver; import org.springframework.web.servlet.view.ViewResolverComposite; -import org.springframework.web.util.ParsingPathMatcher; import org.springframework.web.util.UrlPathHelper; /** @@ -140,7 +141,7 @@ import org.springframework.web.util.UrlPathHelper; * exception types * * - *

Registers an {@link ParsingPathMatcher} and a {@link UrlPathHelper} + *

Registers an {@link AntPathMatcher} and a {@link UrlPathHelper} * to be used by: *