Class RequestMappingInfo.BuilderConfiguration
- java.lang.Object
- org.springframework.web.servlet.mvc.method.RequestMappingInfo.BuilderConfiguration
- Enclosing class:
- RequestMappingInfo
public static class RequestMappingInfo.BuilderConfiguration extends Object
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 Constructor Description BuilderConfiguration()
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ContentNegotiationManagergetContentNegotiationManager()Return the ContentNegotiationManager to use for the ProducesRequestCondition, if any.List<String>getFileExtensions()Return the file extensions to use for suffix pattern matching.PathMatchergetPathMatcher()Return a custom PathMatcher to use for the PatternsRequestCondition, if any.UrlPathHelpergetUrlPathHelper()Return a custom UrlPathHelper to use for the PatternsRequestCondition, if any.voidsetContentNegotiationManager(ContentNegotiationManager contentNegotiationManager)Set the ContentNegotiationManager to use for the ProducesRequestCondition.voidsetPathHelper(UrlPathHelper pathHelper)Deprecated.as of Spring 4.2.8, in favor ofsetUrlPathHelper(org.springframework.web.util.UrlPathHelper)voidsetPathMatcher(PathMatcher pathMatcher)Set a custom PathMatcher to use for the PatternsRequestCondition.voidsetRegisteredSuffixPatternMatch(boolean registeredSuffixPatternMatch)Set whether suffix pattern matching should be restricted to registered file extensions only.voidsetSuffixPatternMatch(boolean suffixPatternMatch)Set whether to apply suffix pattern matching in PatternsRequestCondition.voidsetTrailingSlashMatch(boolean trailingSlashMatch)Set whether to apply trailing slash matching in PatternsRequestCondition.voidsetUrlPathHelper(UrlPathHelper urlPathHelper)Set a custom UrlPathHelper to use for the PatternsRequestCondition.booleanuseRegisteredSuffixPatternMatch()Return whether suffix pattern matching should be restricted to registered file extensions only.booleanuseSuffixPatternMatch()Return whether to apply suffix pattern matching in PatternsRequestCondition.booleanuseTrailingSlashMatch()Return whether to apply trailing slash matching in PatternsRequestCondition.
Constructor Detail
BuilderConfiguration
public BuilderConfiguration()
Method Detail
setPathHelper
@Deprecated public void setPathHelper(UrlPathHelper pathHelper)
Deprecated.as of Spring 4.2.8, in favor ofsetUrlPathHelper(org.springframework.web.util.UrlPathHelper)
setUrlPathHelper
public void setUrlPathHelper(UrlPathHelper urlPathHelper)
Set a custom UrlPathHelper to use for the PatternsRequestCondition.By default this is not set.
- Since:
- 4.2.8
getUrlPathHelper
public UrlPathHelper getUrlPathHelper()
Return a custom UrlPathHelper to use for the PatternsRequestCondition, if any.
setPathMatcher
public void setPathMatcher(PathMatcher pathMatcher)
Set a custom PathMatcher to use for the PatternsRequestCondition.By default this is not set.
getPathMatcher
public PathMatcher 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
public void setSuffixPatternMatch(boolean suffixPatternMatch)
Set whether to apply suffix pattern matching in PatternsRequestCondition.By default this is set to 'true'.
useSuffixPatternMatch
public boolean useSuffixPatternMatch()
Return whether to apply suffix pattern matching in PatternsRequestCondition.
setRegisteredSuffixPatternMatch
public void setRegisteredSuffixPatternMatch(boolean registeredSuffixPatternMatch)
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
public boolean useRegisteredSuffixPatternMatch()
Return whether suffix pattern matching should be restricted to registered file extensions only.
getFileExtensions
public List<String> getFileExtensions()
Return the file extensions to use for suffix pattern matching. IfregisteredSuffixPatternMatch=true, the extensions are obtained from the configuredcontentNegotiationManager.
setContentNegotiationManager
public void setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager)
Set the ContentNegotiationManager to use for the ProducesRequestCondition.By default this is not set.
getContentNegotiationManager
public ContentNegotiationManager getContentNegotiationManager()
Return the ContentNegotiationManager to use for the ProducesRequestCondition, if any.