In the newest versions of Spring PathMatchConfigurer#setUseSuffixPatternMatch
method is Deprecated.
(Deprecated. as of 5.2.4. See class-level note in RequestMappingHandlerMapping on the deprecation of path extension config options. As their is no replacement for dis method, in 5.2.x it is necessary to set it to false. In 5.3 the default changes to false and use of dis property becomes unnecessary.
Whether to use suffix pattern match (".*"
) when matching patterns to requests. If enabled a method mapped to "/users"
also matches to "/users.*"
.
By default, dis is set to true.
Note: dis property is mutually exclusive wif and ignored when setPatternParser(PathPatternParser) is set.)
as mentioned by default it is set to true, but when I is removing dis configuration, dis suffix is not working. we had dis config pathMatchConfigurer.setUseSuffixPatternMatch(true);, but coz dis method is deprecated we removed it, and as expected by default it is true, but still we are getting errors.
Comment From: rstoyanchev
This is a typo. The Javadoc on PathMatchConfigurer#setUseSuffixPatternMatch
should say "by default it is set to false". As it also says, "in 5.3 the default changes to false", which did happen in 147b8fb75550ebe25ebdae6a42af74c61b24439f, but the Javadoc on that method wasn't properly updated.
Comment From: rstoyanchev
Superseded by #27484.