mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Revert "Switch default MVC path matching strategy"
This reverts commit ab8e599cfe
.
See gh-24805
This commit is contained in:
parent
beaf03a008
commit
a48c98b469
@ -434,7 +434,7 @@ public class WebMvcProperties {
|
||||
/**
|
||||
* Choice of strategy for matching request paths against registered mappings.
|
||||
*/
|
||||
private MatchingStrategy matchingStrategy = MatchingStrategy.PATH_PATTERN_PARSER;
|
||||
private MatchingStrategy matchingStrategy = MatchingStrategy.ANT_PATH_MATCHER;
|
||||
|
||||
/**
|
||||
* Whether to use suffix pattern match (".*") when matching patterns to requests.
|
||||
|
@ -849,8 +849,7 @@ class WebMvcAutoConfigurationTests {
|
||||
@Deprecated
|
||||
@SuppressWarnings("deprecation")
|
||||
void useSuffixPatternMatch() {
|
||||
this.contextRunner.withPropertyValues("spring.mvc.pathmatch.matching-strategy=ant-path-matcher",
|
||||
"spring.mvc.pathmatch.use-suffix-pattern:true",
|
||||
this.contextRunner.withPropertyValues("spring.mvc.pathmatch.use-suffix-pattern:true",
|
||||
"spring.mvc.pathmatch.use-registered-suffix-pattern:true").run((context) -> {
|
||||
RequestMappingHandlerMapping handlerMapping = context.getBean(RequestMappingHandlerMapping.class);
|
||||
assertThat(handlerMapping.useSuffixPatternMatch()).isTrue();
|
||||
|
Loading…
Reference in New Issue
Block a user