Update MockMvc default for suffixPattern matching

Closes gh-27030
This commit is contained in:
Rossen Stoyanchev 2021-06-08 16:42:42 +01:00
parent aa2bfd4b62
commit cc2b980e5c
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2020 the original author or authors. * Copyright 2002-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -130,7 +130,7 @@ public class StandaloneMockMvcBuilder extends AbstractMockMvcBuilder<StandaloneM
@Nullable @Nullable
private PathPatternParser patternParser; private PathPatternParser patternParser;
private boolean useSuffixPatternMatch = true; private boolean useSuffixPatternMatch = false;
private boolean useTrailingSlashPatternMatch = true; private boolean useTrailingSlashPatternMatch = true;
@ -324,7 +324,7 @@ public class StandaloneMockMvcBuilder extends AbstractMockMvcBuilder<StandaloneM
/** /**
* Whether to use suffix pattern match (".*") when matching patterns to * Whether to use suffix pattern match (".*") when matching patterns to
* requests. If enabled a method mapped to "/users" also matches to "/users.*". * requests. If enabled a method mapped to "/users" also matches to "/users.*".
* <p>The default value is {@code true}. * <p>The default value is {@code false}.
* @deprecated as of 5.2.4. See class-level note in * @deprecated as of 5.2.4. See class-level note in
* {@link RequestMappingHandlerMapping} on the deprecation of path extension * {@link RequestMappingHandlerMapping} on the deprecation of path extension
* config options. * config options.