Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
a48c98b4
Commit
a48c98b4
authored
Apr 16, 2021
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Switch default MVC path matching strategy"
This reverts commit
ab8e599c
. See gh-24805
parent
beaf03a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
WebMvcProperties.java
...work/boot/autoconfigure/web/servlet/WebMvcProperties.java
+1
-1
WebMvcAutoConfigurationTests.java
...toconfigure/web/servlet/WebMvcAutoConfigurationTests.java
+1
-2
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcProperties.java
View file @
a48c98b4
...
@@ -434,7 +434,7 @@ public class WebMvcProperties {
...
@@ -434,7 +434,7 @@ public class WebMvcProperties {
/**
/**
* Choice of strategy for matching request paths against registered mappings.
* Choice of strategy for matching request paths against registered mappings.
*/
*/
private
MatchingStrategy
matchingStrategy
=
MatchingStrategy
.
PATH_PATTERN_PARS
ER
;
private
MatchingStrategy
matchingStrategy
=
MatchingStrategy
.
ANT_PATH_MATCH
ER
;
/**
/**
* Whether to use suffix pattern match (".*") when matching patterns to requests.
* Whether to use suffix pattern match (".*") when matching patterns to requests.
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java
View file @
a48c98b4
...
@@ -849,8 +849,7 @@ class WebMvcAutoConfigurationTests {
...
@@ -849,8 +849,7 @@ class WebMvcAutoConfigurationTests {
@Deprecated
@Deprecated
@SuppressWarnings
(
"deprecation"
)
@SuppressWarnings
(
"deprecation"
)
void
useSuffixPatternMatch
()
{
void
useSuffixPatternMatch
()
{
this
.
contextRunner
.
withPropertyValues
(
"spring.mvc.pathmatch.matching-strategy=ant-path-matcher"
,
this
.
contextRunner
.
withPropertyValues
(
"spring.mvc.pathmatch.use-suffix-pattern:true"
,
"spring.mvc.pathmatch.use-suffix-pattern:true"
,
"spring.mvc.pathmatch.use-registered-suffix-pattern:true"
).
run
((
context
)
->
{
"spring.mvc.pathmatch.use-registered-suffix-pattern:true"
).
run
((
context
)
->
{
RequestMappingHandlerMapping
handlerMapping
=
context
.
getBean
(
RequestMappingHandlerMapping
.
class
);
RequestMappingHandlerMapping
handlerMapping
=
context
.
getBean
(
RequestMappingHandlerMapping
.
class
);
assertThat
(
handlerMapping
.
useSuffixPatternMatch
()).
isTrue
();
assertThat
(
handlerMapping
.
useSuffixPatternMatch
()).
isTrue
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment