Remove code deprecated in 2.x and add since and forRemoval attributes
Closes gh-32548 Closes gh-32549
This commit is contained in:
@@ -231,31 +231,6 @@ Most standard media types are supported out-of-the-box, but you can also define
|
||||
|
||||
|
||||
|
||||
Suffix pattern matching is deprecated and will be removed in a future release.
|
||||
If you understand the caveats and would still like your application to use suffix pattern matching, the following configuration is required:
|
||||
|
||||
[source,yaml,indent=0,subs="verbatim",configblocks]
|
||||
----
|
||||
spring:
|
||||
mvc:
|
||||
contentnegotiation:
|
||||
favor-path-extension: true
|
||||
pathmatch:
|
||||
use-suffix-pattern: true
|
||||
----
|
||||
|
||||
Alternatively, rather than open all suffix patterns, it is more secure to only support registered suffix patterns:
|
||||
|
||||
[source,yaml,indent=0,subs="verbatim",configblocks]
|
||||
----
|
||||
spring:
|
||||
mvc:
|
||||
contentnegotiation:
|
||||
favor-path-extension: true
|
||||
pathmatch:
|
||||
use-registered-suffix-pattern: true
|
||||
----
|
||||
|
||||
As of Spring Framework 5.3, Spring MVC supports several implementation strategies for matching request paths to Controller handlers.
|
||||
It was previously only supporting the `AntPathMatcher` strategy, but it now also offers `PathPatternParser`.
|
||||
Spring Boot now provides a configuration property to choose and opt in the new strategy:
|
||||
@@ -271,11 +246,8 @@ Spring Boot now provides a configuration property to choose and opt in the new s
|
||||
For more details on why you should consider this new implementation, see the
|
||||
https://spring.io/blog/2020/06/30/url-matching-with-pathpattern-in-spring-mvc[dedicated blog post].
|
||||
|
||||
NOTE: `PathPatternParser` is an optimized implementation but restricts usage of
|
||||
{spring-framework-docs}/web.html#mvc-ann-requestmapping-uri-templates[some path patterns variants]
|
||||
and is incompatible with suffix pattern matching (configprop:spring.mvc.pathmatch.use-suffix-pattern[deprecated],
|
||||
configprop:spring.mvc.pathmatch.use-registered-suffix-pattern[deprecated]) or mapping the `DispatcherServlet`
|
||||
with a servlet prefix (configprop:spring.mvc.servlet.path[]).
|
||||
NOTE: `PathPatternParser` is an optimized implementation but restricts usage of {spring-framework-docs}/web.html#mvc-ann-requestmapping-uri-templates[some path patterns variants].
|
||||
It is incompatible with suffix pattern matching or mapping the `DispatcherServlet` with a servlet prefix (configprop:spring.mvc.servlet.path[]).
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user