类 RequestMappingInfo.BuilderConfiguration
- java.lang.Object
- org.springframework.web.servlet.mvc.method.RequestMappingInfo.BuilderConfiguration
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.
构造器概要
构造器 构造器 说明 BuilderConfiguration()
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 ContentNegotiationManager
getContentNegotiationManager()
Return the ContentNegotiationManager to use for the ProducesRequestCondition, if any.List<String>
getFileExtensions()
已过时。as of 5.2.4.PathMatcher
getPathMatcher()
Return a custom PathMatcher to use for the PatternsRequestCondition, if any.UrlPathHelper
getUrlPathHelper()
Return a custom UrlPathHelper to use for the PatternsRequestCondition, if any.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
setRegisteredSuffixPatternMatch(boolean registeredSuffixPatternMatch)
已过时。as of 5.2.4.void
setSuffixPatternMatch(boolean suffixPatternMatch)
已过时。as of 5.2.4.void
setTrailingSlashMatch(boolean trailingSlashMatch)
Set whether to apply trailing slash matching in PatternsRequestCondition.void
setUrlPathHelper(UrlPathHelper urlPathHelper)
Set a custom UrlPathHelper to use for the PatternsRequestCondition.boolean
useRegisteredSuffixPatternMatch()
已过时。as of 5.2.4.boolean
useSuffixPatternMatch()
已过时。as of 5.2.4.boolean
useTrailingSlashMatch()
Return whether to apply trailing slash matching in PatternsRequestCondition.
构造器详细资料
BuilderConfiguration
public BuilderConfiguration()
方法详细资料
setUrlPathHelper
public void setUrlPathHelper(@Nullable UrlPathHelper urlPathHelper)
Set a custom UrlPathHelper to use for the PatternsRequestCondition.By default this is not set.
- 从以下版本开始:
- 4.2.8
getUrlPathHelper
@Nullable public UrlPathHelper getUrlPathHelper()
Return a custom UrlPathHelper to use for the PatternsRequestCondition, if any.
setPathMatcher
public void setPathMatcher(@Nullable PathMatcher pathMatcher)
Set a custom PathMatcher to use for the PatternsRequestCondition.By default this is not set.
getPathMatcher
@Nullable 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
@Deprecated public void setSuffixPatternMatch(boolean suffixPatternMatch)
已过时。as of 5.2.4. See class-level note inRequestMappingHandlerMapping
on the deprecation of path extension config options.Set whether to apply suffix pattern matching in PatternsRequestCondition.By default this is set to 'true'.
useSuffixPatternMatch
@Deprecated public boolean useSuffixPatternMatch()
已过时。as of 5.2.4. See class-level note inRequestMappingHandlerMapping
on the deprecation of path extension config options.Return whether to apply suffix pattern matching in PatternsRequestCondition.
setRegisteredSuffixPatternMatch
@Deprecated public void setRegisteredSuffixPatternMatch(boolean registeredSuffixPatternMatch)
已过时。as of 5.2.4. See class-level note inRequestMappingHandlerMapping
on the deprecation of path extension config options; note also that in 5.3 the default for this property switches fromfalse
totrue
.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 public boolean useRegisteredSuffixPatternMatch()
已过时。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
@Nullable @Deprecated public List<String> getFileExtensions()
已过时。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
public void setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager)
Set the ContentNegotiationManager to use for the ProducesRequestCondition.By default this is not set.
getContentNegotiationManager
@Nullable public ContentNegotiationManager getContentNegotiationManager()
Return the ContentNegotiationManager to use for the ProducesRequestCondition, if any.