From 7c9ad6dd08ccd613c4c9828d908de260ab2fb2aa Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 12 May 2020 06:50:09 +0100 Subject: [PATCH] Add deprecation notes to the WebMvc config schema Closes gh-23915 --- .../annotation/RequestMappingHandlerMapping.java | 3 ++- .../web/servlet/config/spring-mvc.xsd | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.java index 2788eaa8e20..a0f3545d7a4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.java @@ -63,7 +63,8 @@ import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMappi * {@link #setUseRegisteredSuffixPatternMatch(boolean) useRegisteredSuffixPatternMatch} * are deprecated in order to discourage use of path extensions for request * mapping and for content negotiation (with similar deprecations in - * {@link ContentNegotiationManager}). For further context, please read issue + * {@link org.springframework.web.accept.ContentNegotiationManagerFactoryBean + * ContentNegotiationManagerFactoryBean}). For further context, please read issue * #24719. * * @author Arjen Poutsma diff --git a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc.xsd b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc.xsd index 398247f4f91..0c0671c0c01 100644 --- a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc.xsd +++ b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc.xsd @@ -36,7 +36,14 @@ @@ -56,6 +63,13 @@ explicitly registered when you configure content negotiation. This is generally recommended to reduce ambiguity and to avoid issues such as when a "." appears in the path for other reasons. + + In 5.2.4, suffix pattern matching was deprecated in order to discourage use of path + extensions for request mapping and for content negotiation (see deprecation notes on + org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping and on + org.springframework.web.accept.ContentNegotiationManagerFactoryBean and + also see https://github.com/spring-projects/spring-framework/issues/24179. + The default value is false. ]]>