You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/mvc/condition/PatternsRequestCondition.java
+29-19Lines changed: 29 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -50,13 +50,15 @@ public final class PatternsRequestCondition extends AbstractRequestCondition<Pat
50
50
51
51
privatefinalbooleanuseSuffixPatternMatch;
52
52
53
+
privatefinalbooleanuseTrailingSlashMatch;
54
+
53
55
/**
54
56
* Creates a new instance with the given URL patterns.
55
57
* Each pattern that is not empty and does not start with "/" is pre-pended with "/".
56
58
* @param patterns 0 or more URL patterns; if 0 the condition will match to every request.
Copy file name to clipboardExpand all lines: org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.java
+20-3Lines changed: 20 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -44,21 +44,38 @@ public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMappi
44
44
45
45
privatebooleanuseSuffixPatternMatch = true;
46
46
47
+
privatebooleanuseTrailingSlashMatch = true;
48
+
47
49
/**
48
50
* Whether to use suffix pattern match (".*") when matching patterns to
49
-
* requests. If enabled a method mapped to "/users" also matches to
50
-
* "/users.*". The default value is "true".
51
+
* requests. If enabled a method mapped to "/users" also matches to "/users.*".
Copy file name to clipboardExpand all lines: org.springframework.web.servlet/src/test/java/org/springframework/web/servlet/mvc/condition/PatternsRequestConditionTests.java
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ public void matchSuffixPattern() {
Copy file name to clipboardExpand all lines: org.springframework.web.servlet/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMappingTests.java
0 commit comments