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
Constructors -
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.voidsetContentNegotiationManager(ContentNegotiationManager contentNegotiationManager) Set the ContentNegotiationManager to use for the ProducesRequestCondition.voidsetPathMatcher(PathMatcher pathMatcher) Set a custom PathMatcher to use for the PatternsRequestCondition.voidsetPatternParser(PathPatternParser patternParser) Enable use of parsedPathPatterns as described inAbstractHandlerMapping.setPatternParser(PathPatternParser).voidsetRegisteredSuffixPatternMatch(boolean registeredSuffixPatternMatch) Deprecated.as of 5.2.4.voidsetSuffixPatternMatch(boolean suffixPatternMatch) Deprecated.as of 5.2.4.voidsetTrailingSlashMatch(boolean trailingSlashMatch) Deprecated.as of 6.0, seePathPatternParser.setMatchOptionalTrailingSeparator(boolean)voidsetUrlPathHelper(UrlPathHelper urlPathHelper) Deprecated.as of 5.3, the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)booleanDeprecated.as of 5.2.4.booleanDeprecated.as of 5.2.4.booleanDeprecated.as of 6.0 together withsetTrailingSlashMatch(boolean)
-
Constructor Details
-
BuilderConfiguration
public BuilderConfiguration()
-
-
Method Details
-
setPatternParser
Enable use of parsedPathPatterns 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
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
truetofalsein 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 inRequestMappingHandlerMappingon 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=trueand 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 inRequestMappingHandlerMappingon 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 inRequestMappingHandlerMappingon 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.
-