Class MvcNamespaceUtils
java.lang.Object
org.springframework.web.servlet.config.MvcNamespaceUtils
Convenience methods for use in MVC namespace BeanDefinitionParsers.
- Since:
- 3.1
- Author:
- Rossen Stoyanchev, Juergen Hoeller, Brian Clozel, Marten Deinum
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ObjectFind theContentNegotiationManagerbean created by or registered with theannotation-drivenelement.static RuntimeBeanReferenceregisterCorsConfigurations(Map<String, CorsConfiguration> corsConfigurations, ParserContext context, Object source) Registers aMap<String, CorsConfiguration>(mappedCorsConfigurations) under a well-known name unless already registered.static voidregisterDefaultComponents(ParserContext context, Object source) static RuntimeBeanReferenceregisterPathMatcher(RuntimeBeanReference pathMatcherRef, ParserContext context, Object source) Adds an alias to an existing well-known name or registers a new instance of aPathMatcherunder that well-known name, unless already registered.static RuntimeBeanReferenceregisterPatternParser(RuntimeBeanReference patternParserRef, ParserContext context, Object source) Adds an alias to an existing well-known name or registers a new instance of aPathPatternParserunder that well-known name, unless already registered.static RuntimeBeanReferenceregisterUrlPathHelper(RuntimeBeanReference urlPathHelperRef, ParserContext context, Object source) Adds an alias to an existing well-known name or registers a new instance of aUrlPathHelperunder that well-known name, unless already registered.
- 
Constructor Details- 
MvcNamespaceUtilspublic MvcNamespaceUtils()
 
- 
- 
Method Details- 
registerDefaultComponents
- 
registerUrlPathHelperpublic static RuntimeBeanReference registerUrlPathHelper(@Nullable RuntimeBeanReference urlPathHelperRef, ParserContext context, @Nullable Object source) Adds an alias to an existing well-known name or registers a new instance of aUrlPathHelperunder that well-known name, unless already registered.- Returns:
- a RuntimeBeanReference to this UrlPathHelperinstance
 
- 
registerPathMatcherpublic static RuntimeBeanReference registerPathMatcher(@Nullable RuntimeBeanReference pathMatcherRef, ParserContext context, @Nullable Object source) Adds an alias to an existing well-known name or registers a new instance of aPathMatcherunder that well-known name, unless already registered.- Returns:
- a RuntimeBeanReference to this PathMatcherinstance
 
- 
registerPatternParserpublic static RuntimeBeanReference registerPatternParser(@Nullable RuntimeBeanReference patternParserRef, ParserContext context, @Nullable Object source) Adds an alias to an existing well-known name or registers a new instance of aPathPatternParserunder that well-known name, unless already registered.- Returns:
- a RuntimeBeanReference to this PathPatternParserinstance
 
- 
registerCorsConfigurationspublic static RuntimeBeanReference registerCorsConfigurations(@Nullable Map<String, CorsConfiguration> corsConfigurations, ParserContext context, @Nullable Object source) Registers aMap<String, CorsConfiguration>(mappedCorsConfigurations) under a well-known name unless already registered. The bean definition may be updated if a non-null CORS configuration is provided.- Returns:
- a RuntimeBeanReference to this Map<String, CorsConfiguration>instance
 
- 
getContentNegotiationManagerFind theContentNegotiationManagerbean created by or registered with theannotation-drivenelement.- Returns:
- a bean definition, bean reference, or nullif none defined
 
 
-