Deprecate and set trailingSlash option to false
Closes gh-28552
This commit is contained in:
@@ -106,8 +106,12 @@ public class PathMatchConfigurer {
|
||||
/**
|
||||
* Whether to match to URLs irrespective of the presence of a trailing slash.
|
||||
* If enabled a method mapped to "/users" also matches to "/users/".
|
||||
* <p>The default value is {@code true}.
|
||||
* <p>The default was changed in 6.0 from {@code true} to {@code false} in
|
||||
* order to support the deprecation of the property.
|
||||
* @deprecated as of 6.0, see
|
||||
* {@link PathPatternParser#setMatchOptionalTrailingSeparator(boolean)}
|
||||
*/
|
||||
@Deprecated
|
||||
public PathMatchConfigurer setUseTrailingSlashMatch(Boolean trailingSlashMatch) {
|
||||
this.trailingSlashMatch = trailingSlashMatch;
|
||||
return this;
|
||||
|
||||
@@ -104,7 +104,10 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping i
|
||||
* Whether to match to URLs irrespective of the presence of a trailing slash.
|
||||
* If enabled a URL pattern such as "/users" also matches to "/users/".
|
||||
* <p>The default value is {@code false}.
|
||||
* @deprecated as of 6.0, see
|
||||
* {@link PathPatternParser#setMatchOptionalTrailingSeparator(boolean)}
|
||||
*/
|
||||
@Deprecated
|
||||
public void setUseTrailingSlashMatch(boolean useTrailingSlashMatch) {
|
||||
this.useTrailingSlashMatch = useTrailingSlashMatch;
|
||||
if (getPatternParser() != null) {
|
||||
|
||||
@@ -140,8 +140,12 @@ public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMappi
|
||||
/**
|
||||
* Whether to match to URLs irrespective of the presence of a trailing slash.
|
||||
* If enabled a method mapped to "/users" also matches to "/users/".
|
||||
* <p>The default value is {@code true}.
|
||||
* <p>The default was changed in 6.0 from {@code true} to {@code false} in
|
||||
* order to support the deprecation of the property.
|
||||
* @deprecated as of 6.0, see
|
||||
* {@link PathPatternParser#setMatchOptionalTrailingSeparator(boolean)}
|
||||
*/
|
||||
@Deprecated
|
||||
public void setUseTrailingSlashMatch(boolean useTrailingSlashMatch) {
|
||||
this.useTrailingSlashMatch = useTrailingSlashMatch;
|
||||
if (getPatternParser() != null) {
|
||||
|
||||
@@ -52,7 +52,9 @@
|
||||
<xsd:documentation><![CDATA[
|
||||
Whether to match to URLs irrespective of the presence of a trailing slash.
|
||||
If enabled a method mapped to "/users" also matches to "/users/".
|
||||
The default value is true.
|
||||
|
||||
The default was changed in 6.0 from true to false in order to support the
|
||||
deprecation of the property.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
|
||||
Reference in New Issue
Block a user