Remove code deprecated in 2.x and add since and forRemoval attributes

Closes gh-32548
Closes gh-32549
This commit is contained in:
Andy Wilkinson
2022-09-30 12:02:16 +01:00
parent 03b3a772c9
commit 51df7813a5
52 changed files with 85 additions and 560 deletions

View File

@@ -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[]).