Deprecate UrlPathHelper shortcuts on AbstractHandlerMapping

Given the availability of two alternatives mechanisms for URL path
matching, PathPatternParser and AntPathMatcher, and now that
parsed patterns are enabled by default, it makes sense to reduce the
proliferation of options on AbstractHandlerMapping by deprecating
shortcuts related to String path matching. Most applications rely
on Boot and on the MVC config to do all this.

See gh-28607
This commit is contained in:
rstoyanchev
2022-06-29 13:03:10 +01:00
parent 8d08b1d323
commit 14fd2605a3
11 changed files with 44 additions and 34 deletions

View File

@@ -4,15 +4,11 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="urlMapping1" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="patternParser" >
<bean class="org.springframework.web.util.pattern.PathPatternParser"/>
</property>
<property name="mappings"><ref bean="mappings"/></property>
</bean>
<bean id="urlMapping2" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="patternParser"><null/></property>
<property name="urlDecode"><value>true</value></property>
<property name="mappings"><ref bean="mappings"/></property>
</bean>