Class RequestMappingInfo.BuilderConfiguration
java.lang.Object
org.springframework.web.servlet.mvc.method.RequestMappingInfo.BuilderConfiguration
- Enclosing class:
- RequestMappingInfo
Container for configuration options used for request mapping purposes.
Such configuration is required to create RequestMappingInfo instances but
is typically used across all RequestMappingInfo instances.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn the ContentNegotiationManager to use for the ProducesRequestCondition, if any.Deprecated.as of 5.2.4.Return a custom PathMatcher to use for the PatternsRequestCondition, if any.Deprecated.as of 5.3, the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)
; this method always returnsUrlPathHelper.defaultInstance
.void
setContentNegotiationManager
(ContentNegotiationManager contentNegotiationManager) Set the ContentNegotiationManager to use for the ProducesRequestCondition.void
setPathMatcher
(PathMatcher pathMatcher) Set a custom PathMatcher to use for the PatternsRequestCondition.void
setPatternParser
(PathPatternParser patternParser) Enable use of parsedPathPattern
s as described inAbstractHandlerMapping.setPatternParser(PathPatternParser)
.void
setRegisteredSuffixPatternMatch
(boolean registeredSuffixPatternMatch) Deprecated.as of 5.2.4.void
setSuffixPatternMatch
(boolean suffixPatternMatch) Deprecated.as of 5.2.4.void
setTrailingSlashMatch
(boolean trailingSlashMatch) Set whether to apply trailing slash matching in PatternsRequestCondition.void
setUrlPathHelper
(UrlPathHelper urlPathHelper) Deprecated.as of 5.3, the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)
boolean
Deprecated.as of 5.2.4.boolean
Deprecated.as of 5.2.4.boolean
Return whether to apply trailing slash matching in PatternsRequestCondition.
-
Constructor Details
-
BuilderConfiguration
public BuilderConfiguration()
-
-
Method Details
-
setPatternParser
Enable use of parsedPathPattern
s as described inAbstractHandlerMapping.setPatternParser(PathPatternParser)
.Note: This property is mutually exclusive with
setPathMatcher(PathMatcher)
.By default this is not enabled.
- Since:
- 5.3
-
getPatternParser
- Since:
- 5.3
-
setUrlPathHelper
Deprecated.as of 5.3, the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)
Set a custom UrlPathHelper to use for the PatternsRequestCondition.By default this is not set.
- Since:
- 4.2.8
-
getUrlPathHelper
Deprecated.as of 5.3, the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)
; this method always returnsUrlPathHelper.defaultInstance
.Return the configured UrlPathHelper. -
setPathMatcher
Set a custom PathMatcher to use for the PatternsRequestCondition.By default this is not set.
-
getPathMatcher
Return a custom PathMatcher to use for the PatternsRequestCondition, if any. -
setTrailingSlashMatch
public void setTrailingSlashMatch(boolean trailingSlashMatch) Set whether to apply trailing slash matching in PatternsRequestCondition.By default this is set to 'true'.
-
useTrailingSlashMatch
public boolean useTrailingSlashMatch()Return whether to apply trailing slash matching in PatternsRequestCondition. -
setSuffixPatternMatch
Deprecated.as of 5.2.4. See deprecation note onRequestMappingHandlerMapping.setUseSuffixPatternMatch(boolean)
.Set whether to apply suffix pattern matching in PatternsRequestCondition.By default this is set to 'false'.
- See Also:
-
useSuffixPatternMatch
Deprecated.as of 5.2.4. See deprecation note onRequestMappingHandlerMapping.setUseSuffixPatternMatch(boolean)
.Return whether to apply suffix pattern matching in PatternsRequestCondition. -
setRegisteredSuffixPatternMatch
Deprecated.as of 5.2.4. See class-level note inRequestMappingHandlerMapping
on the deprecation of path extension config options.Set whether suffix pattern matching should be restricted to registered file extensions only. Setting this property also setssuffixPatternMatch=true
and requires that asetContentNegotiationManager(org.springframework.web.accept.ContentNegotiationManager)
is also configured in order to obtain the registered file extensions. -
useRegisteredSuffixPatternMatch
Deprecated.as of 5.2.4. See class-level note inRequestMappingHandlerMapping
on the deprecation of path extension config options.Return whether suffix pattern matching should be restricted to registered file extensions only. -
getFileExtensions
Deprecated.as of 5.2.4. See class-level note inRequestMappingHandlerMapping
on the deprecation of path extension config options.Return the file extensions to use for suffix pattern matching. IfregisteredSuffixPatternMatch=true
, the extensions are obtained from the configuredcontentNegotiationManager
. -
setContentNegotiationManager
Set the ContentNegotiationManager to use for the ProducesRequestCondition.By default this is not set.
-
getContentNegotiationManager
Return the ContentNegotiationManager to use for the ProducesRequestCondition, if any.
-