类 MvcNamespaceUtils
- java.lang.Object
- org.springframework.web.servlet.config.MvcNamespaceUtils
public abstract class MvcNamespaceUtils extends Object
Convenience methods for use in MVC namespace BeanDefinitionParsers.- 从以下版本开始:
- 3.1
- 作者:
- Rossen Stoyanchev, Brian Clozel
构造器概要
构造器 构造器 说明 MvcNamespaceUtils()
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static Object
getContentNegotiationManager(ParserContext context)
Find theContentNegotiationManager
bean created by or registered with theannotation-driven
element.static RuntimeBeanReference
registerCorsConfigurations(Map<String,CorsConfiguration> corsConfigurations, ParserContext context, Object source)
Registers aMap<String, CorsConfiguration>
(mappedCorsConfiguration
s) under a well-known name unless already registered.static void
registerDefaultComponents(ParserContext parserContext, Object source)
static RuntimeBeanReference
registerPathMatcher(RuntimeBeanReference pathMatcherRef, ParserContext parserContext, Object source)
Adds an alias to an existing well-known name or registers a new instance of aPathMatcher
under that well-known name, unless already registered.static RuntimeBeanReference
registerUrlPathHelper(RuntimeBeanReference urlPathHelperRef, ParserContext parserContext, Object source)
Adds an alias to an existing well-known name or registers a new instance of aUrlPathHelper
under that well-known name, unless already registered.
构造器详细资料
MvcNamespaceUtils
public MvcNamespaceUtils()
方法详细资料
registerDefaultComponents
public static void registerDefaultComponents(ParserContext parserContext, @Nullable Object source)
registerUrlPathHelper
public static RuntimeBeanReference registerUrlPathHelper(@Nullable RuntimeBeanReference urlPathHelperRef, ParserContext parserContext, @Nullable Object source)
Adds an alias to an existing well-known name or registers a new instance of aUrlPathHelper
under that well-known name, unless already registered.- 返回:
- a RuntimeBeanReference to this
UrlPathHelper
instance
registerPathMatcher
public static RuntimeBeanReference registerPathMatcher(@Nullable RuntimeBeanReference pathMatcherRef, ParserContext parserContext, @Nullable Object source)
Adds an alias to an existing well-known name or registers a new instance of aPathMatcher
under that well-known name, unless already registered.- 返回:
- a RuntimeBeanReference to this
PathMatcher
instance
registerCorsConfigurations
public static RuntimeBeanReference registerCorsConfigurations(@Nullable Map<String,CorsConfiguration> corsConfigurations, ParserContext context, @Nullable Object source)
Registers aMap<String, CorsConfiguration>
(mappedCorsConfiguration
s) under a well-known name unless already registered. The bean definition may be updated if a non-null CORS configuration is provided.- 返回:
- a RuntimeBeanReference to this
Map<String, CorsConfiguration>
instance
getContentNegotiationManager
@Nullable public static Object getContentNegotiationManager(ParserContext context)
Find theContentNegotiationManager
bean created by or registered with theannotation-driven
element.- 返回:
- a bean definition, bean reference, or
null
if none defined