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.Return thePathPatternParser
to use, the one set explicitly or falling back on a default instance if bothPathPatternParser
andPathMatcher
are not set.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) Deprecated.as of 6.0, seePathPatternParser.setMatchOptionalTrailingSeparator(boolean)
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
Deprecated.as of 6.0 together withsetTrailingSlashMatch(boolean)
-
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 set, but
RequestMappingInfo.Builder
defaults to usingPathPatternParser
unlesssetPathMatcher(PathMatcher)
is explicitly set.- 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. You must set it explicitly if you want
PathMatcher
to be used, or otherwiseRequestMappingInfo
defaults to usingPathPatternParser
. -
getPathMatcher
Return a custom PathMatcher to use for the PatternsRequestCondition, if any. -
getPatternParserToUse
Return thePathPatternParser
to use, the one set explicitly or falling back on a default instance if bothPathPatternParser
andPathMatcher
are not set.- Since:
- 6.1.2
-
setTrailingSlashMatch
Deprecated.as of 6.0, seePathPatternParser.setMatchOptionalTrailingSeparator(boolean)
Set whether to apply trailing slash matching in PatternsRequestCondition.The default was changed in 6.0 from
true
tofalse
in order to support the deprecation of the property. -
useTrailingSlashMatch
Deprecated.as of 6.0 together withsetTrailingSlashMatch(boolean)
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.
-