Skip to content

Commit 84b8cec

Browse files
committed
Update Javadoc for AbstractHandlerMapping properties
Clarify what PathPatternParser is used for which is CORS checks in the very least. Some sub-classes will also use it for request mapping but not all (e.g. RouterFunctionMapping). Hence the need to be more explicit.
1 parent 72e3c43 commit 84b8cec

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractHandlerMapping.java

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,25 +78,37 @@ public final int getOrder() {
7878
}
7979

8080
/**
81-
* Whether to match to URLs irrespective of their case.
82-
* If enabled a method mapped to "/users" won't match to "/Users/".
83-
* <p>The default value is {@code false}.
81+
* Shortcut method for setting the same property on the underlying pattern
82+
* parser in use. For more details see:
83+
* <ul>
84+
* <li>{@link #getPathPatternParser()} -- the underlying pattern parser
85+
* <li>{@link PathPatternParser#setCaseSensitive(boolean)} -- the case
86+
* sensitive slash option, including its default value.
87+
* </ul>
88+
* <p><strong>Note:</strong> aside from
8489
*/
8590
public void setUseCaseSensitiveMatch(boolean caseSensitiveMatch) {
8691
this.patternParser.setCaseSensitive(caseSensitiveMatch);
8792
}
8893

8994
/**
90-
* Whether to match to URLs irrespective of the presence of a trailing slash.
91-
* If enabled a method mapped to "/users" also matches to "/users/".
92-
* <p>The default value is {@code true}.
95+
* Shortcut method for setting the same property on the underlying pattern
96+
* parser in use. For more details see:
97+
* <ul>
98+
* <li>{@link #getPathPatternParser()} -- the underlying pattern parser
99+
* <li>{@link PathPatternParser#setMatchOptionalTrailingSeparator(boolean)} --
100+
* the trailing slash option, including its default value.
101+
* </ul>
93102
*/
94103
public void setUseTrailingSlashMatch(boolean trailingSlashMatch) {
95104
this.patternParser.setMatchOptionalTrailingSeparator(trailingSlashMatch);
96105
}
97106

98107
/**
99-
* Return the {@link PathPatternParser} instance.
108+
* Return the {@link PathPatternParser} instance that is used for
109+
* {@link #setCorsConfigurations(Map) CORS configuration checks}.
110+
* Sub-classes can also use this pattern parser for their own request
111+
* mapping purposes.
100112
*/
101113
public PathPatternParser getPathPatternParser() {
102114
return this.patternParser;

0 commit comments

Comments
 (0)