From 84b8ceca0fe33366d1e6524137aeda67c9c6f46e Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Thu, 11 Jan 2018 12:41:04 -0500 Subject: [PATCH] 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. --- .../handler/AbstractHandlerMapping.java | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractHandlerMapping.java b/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractHandlerMapping.java index b2aff9aa5f..cae5ea8e48 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractHandlerMapping.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractHandlerMapping.java @@ -78,25 +78,37 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport im } /** - * Whether to match to URLs irrespective of their case. - * If enabled a method mapped to "/users" won't match to "/Users/". - *

The default value is {@code false}. + * Shortcut method for setting the same property on the underlying pattern + * parser in use. For more details see: + *

+ *

Note: aside from */ public void setUseCaseSensitiveMatch(boolean caseSensitiveMatch) { this.patternParser.setCaseSensitive(caseSensitiveMatch); } /** - * Whether to match to URLs irrespective of the presence of a trailing slash. - * If enabled a method mapped to "/users" also matches to "/users/". - *

The default value is {@code true}. + * Shortcut method for setting the same property on the underlying pattern + * parser in use. For more details see: + *

*/ public void setUseTrailingSlashMatch(boolean trailingSlashMatch) { this.patternParser.setMatchOptionalTrailingSeparator(trailingSlashMatch); } /** - * Return the {@link PathPatternParser} instance. + * Return the {@link PathPatternParser} instance that is used for + * {@link #setCorsConfigurations(Map) CORS configuration checks}. + * Sub-classes can also use this pattern parser for their own request + * mapping purposes. */ public PathPatternParser getPathPatternParser() { return this.patternParser;