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, for removal: This API element is subject to removal in a future version.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
(@Nullable PathMatcher pathMatcher) Deprecated, for removal: This API element is subject to removal in a future version.use ofPathMatcher
andUrlPathHelper
is deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser
.void
setPatternParser
(@Nullable PathPatternParser patternParser) Enable use of parsedPathPattern
s as described inAbstractHandlerMapping.setPatternParser(PathPatternParser)
.void
setUrlPathHelper
(@Nullable UrlPathHelper urlPathHelper) Deprecated.as of 5.3, the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)
-
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
@Deprecated(since="7.0", forRemoval=true) public void setPathMatcher(@Nullable PathMatcher pathMatcher) Deprecated, for removal: This API element is subject to removal in a future version.use ofPathMatcher
andUrlPathHelper
is deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser
.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
Deprecated, for removal: This API element is subject to removal in a future version.use ofPathMatcher
andUrlPathHelper
is deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser
.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
-
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.
-
PathMatcher
andUrlPathHelper
is deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser
.