|
|
|
@ -523,11 +523,15 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Set a custom UrlPathHelper to use for the PatternsRequestCondition. |
|
|
|
* Set a custom UrlPathHelper to use for the PatternsRequestCondition. |
|
|
|
* <p>By default this is not set. |
|
|
|
* <p>By default this is not set. |
|
|
|
|
|
|
|
* @since 4.2.8 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void setPathHelper(UrlPathHelper pathHelper) { |
|
|
|
public void setUrlPathHelper(UrlPathHelper pathHelper) { |
|
|
|
this.urlPathHelper = pathHelper; |
|
|
|
this.urlPathHelper = pathHelper; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Return a custom UrlPathHelper to use for the PatternsRequestCondition, if any. |
|
|
|
|
|
|
|
*/ |
|
|
|
public UrlPathHelper getUrlPathHelper() { |
|
|
|
public UrlPathHelper getUrlPathHelper() { |
|
|
|
return this.urlPathHelper; |
|
|
|
return this.urlPathHelper; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -540,24 +544,30 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping |
|
|
|
this.pathMatcher = pathMatcher; |
|
|
|
this.pathMatcher = pathMatcher; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Return a custom PathMatcher to use for the PatternsRequestCondition, if any. |
|
|
|
|
|
|
|
*/ |
|
|
|
public PathMatcher getPathMatcher() { |
|
|
|
public PathMatcher getPathMatcher() { |
|
|
|
return this.pathMatcher; |
|
|
|
return this.pathMatcher; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Whether to apply trailing slash matching in PatternsRequestCondition. |
|
|
|
* Set whether to apply trailing slash matching in PatternsRequestCondition. |
|
|
|
* <p>By default this is set to 'true'. |
|
|
|
* <p>By default this is set to 'true'. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void setTrailingSlashMatch(boolean trailingSlashMatch) { |
|
|
|
public void setTrailingSlashMatch(boolean trailingSlashMatch) { |
|
|
|
this.trailingSlashMatch = trailingSlashMatch; |
|
|
|
this.trailingSlashMatch = trailingSlashMatch; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Return whether to apply trailing slash matching in PatternsRequestCondition. |
|
|
|
|
|
|
|
*/ |
|
|
|
public boolean useTrailingSlashMatch() { |
|
|
|
public boolean useTrailingSlashMatch() { |
|
|
|
return this.trailingSlashMatch; |
|
|
|
return this.trailingSlashMatch; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Whether to apply suffix pattern matching in PatternsRequestCondition. |
|
|
|
* Set whether to apply suffix pattern matching in PatternsRequestCondition. |
|
|
|
* <p>By default this is set to 'true'. |
|
|
|
* <p>By default this is set to 'true'. |
|
|
|
* @see #setRegisteredSuffixPatternMatch(boolean) |
|
|
|
* @see #setRegisteredSuffixPatternMatch(boolean) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -565,14 +575,17 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping |
|
|
|
this.suffixPatternMatch = suffixPatternMatch; |
|
|
|
this.suffixPatternMatch = suffixPatternMatch; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Return whether to apply suffix pattern matching in PatternsRequestCondition. |
|
|
|
|
|
|
|
*/ |
|
|
|
public boolean useSuffixPatternMatch() { |
|
|
|
public boolean useSuffixPatternMatch() { |
|
|
|
return this.suffixPatternMatch; |
|
|
|
return this.suffixPatternMatch; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Whether suffix pattern matching should be restricted to registered |
|
|
|
* Set whether suffix pattern matching should be restricted to registered |
|
|
|
* file extensions only. Setting this property also sets |
|
|
|
* file extensions only. Setting this property also sets |
|
|
|
* suffixPatternMatch=true and requires that a |
|
|
|
* {@code suffixPatternMatch=true} and requires that a |
|
|
|
* {@link #setContentNegotiationManager} is also configured in order to |
|
|
|
* {@link #setContentNegotiationManager} is also configured in order to |
|
|
|
* obtain the registered file extensions. |
|
|
|
* obtain the registered file extensions. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -581,6 +594,10 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping |
|
|
|
this.suffixPatternMatch = (registeredSuffixPatternMatch || this.suffixPatternMatch); |
|
|
|
this.suffixPatternMatch = (registeredSuffixPatternMatch || this.suffixPatternMatch); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Return whether suffix pattern matching should be restricted to registered |
|
|
|
|
|
|
|
* file extensions only. |
|
|
|
|
|
|
|
*/ |
|
|
|
public boolean useRegisteredSuffixPatternMatch() { |
|
|
|
public boolean useRegisteredSuffixPatternMatch() { |
|
|
|
return this.registeredSuffixPatternMatch; |
|
|
|
return this.registeredSuffixPatternMatch; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -601,10 +618,14 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping |
|
|
|
* Set the ContentNegotiationManager to use for the ProducesRequestCondition. |
|
|
|
* Set the ContentNegotiationManager to use for the ProducesRequestCondition. |
|
|
|
* <p>By default this is not set. |
|
|
|
* <p>By default this is not set. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void setContentNegotiationManager(ContentNegotiationManager manager) { |
|
|
|
public void setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager) { |
|
|
|
this.contentNegotiationManager = manager; |
|
|
|
this.contentNegotiationManager = contentNegotiationManager; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Return the ContentNegotiationManager to use for the ProducesRequestCondition, |
|
|
|
|
|
|
|
* if any. |
|
|
|
|
|
|
|
*/ |
|
|
|
public ContentNegotiationManager getContentNegotiationManager() { |
|
|
|
public ContentNegotiationManager getContentNegotiationManager() { |
|
|
|
return this.contentNegotiationManager; |
|
|
|
return this.contentNegotiationManager; |
|
|
|
} |
|
|
|
} |
|
|
|
|