spring-framework / org.springframework.web.servlet.config / MvcNamespaceUtils

MvcNamespaceUtils

abstract class MvcNamespaceUtils

Convenience methods for use in MVC namespace BeanDefinitionParsers.

Author
Rossen Stoyanchev

Author
Brian Clozel

Since
3.1

Constructors

<init>

MvcNamespaceUtils()

Convenience methods for use in MVC namespace BeanDefinitionParsers.

Functions

getContentNegotiationManager

open static fun getContentNegotiationManager(context: ParserContext): Any

Find the ContentNegotiationManager bean created by or registered with the annotation-driven element.

registerCorsConfigurations

open static fun registerCorsConfigurations(corsConfigurations: MutableMap<String, CorsConfiguration>, context: ParserContext, source: Any): RuntimeBeanReference

Registers a Map<String, CorsConfiguration> (mapped CorsConfigurations) under a well-known name unless already registered. The bean definition may be updated if a non-null CORS configuration is provided.

registerDefaultComponents

open static fun registerDefaultComponents(parserContext: ParserContext, source: Any): Unit

registerPathMatcher

open static fun registerPathMatcher(pathMatcherRef: RuntimeBeanReference, parserContext: ParserContext, source: Any): RuntimeBeanReference

Adds an alias to an existing well-known name or registers a new instance of a PathMatcher under that well-known name, unless already registered.

registerUrlPathHelper

open static fun registerUrlPathHelper(urlPathHelperRef: RuntimeBeanReference, parserContext: ParserContext, source: Any): RuntimeBeanReference

Adds an alias to an existing well-known name or registers a new instance of a UrlPathHelper under that well-known name, unless already registered.