Class MvcNamespaceUtils

java.lang.Object
org.springframework.web.servlet.config.MvcNamespaceUtils

public abstract class MvcNamespaceUtils extends Object
Convenience methods for use in MVC namespace BeanDefinitionParsers.
Since:
3.1
Author:
Rossen Stoyanchev, Juergen Hoeller, Brian Clozel, Marten Deinum
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Object
    getContentNegotiationManager(org.springframework.beans.factory.xml.ParserContext context)
    Find the ContentNegotiationManager bean created by or registered with the annotation-driven element.
    static org.springframework.beans.factory.config.RuntimeBeanReference
    registerCorsConfigurations(Map<String,org.springframework.web.cors.CorsConfiguration> corsConfigurations, org.springframework.beans.factory.xml.ParserContext context, Object source)
    Registers a Map<String, CorsConfiguration> (mapped CorsConfigurations) under a well-known name unless already registered.
    static void
    registerDefaultComponents(org.springframework.beans.factory.xml.ParserContext context, Object source)
     
    static org.springframework.beans.factory.config.RuntimeBeanReference
    registerPathMatcher(org.springframework.beans.factory.config.RuntimeBeanReference pathMatcherRef, org.springframework.beans.factory.xml.ParserContext context, Object source)
    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.
    static org.springframework.beans.factory.config.RuntimeBeanReference
    registerUrlPathHelper(org.springframework.beans.factory.config.RuntimeBeanReference urlPathHelperRef, org.springframework.beans.factory.xml.ParserContext context, Object source)
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MvcNamespaceUtils

      public MvcNamespaceUtils()
  • Method Details

    • registerDefaultComponents

      public static void registerDefaultComponents(org.springframework.beans.factory.xml.ParserContext context, @Nullable Object source)
    • registerUrlPathHelper

      public static org.springframework.beans.factory.config.RuntimeBeanReference registerUrlPathHelper(@Nullable org.springframework.beans.factory.config.RuntimeBeanReference urlPathHelperRef, org.springframework.beans.factory.xml.ParserContext context, @Nullable Object source)
      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.
      Returns:
      a RuntimeBeanReference to this UrlPathHelper instance
    • registerPathMatcher

      public static org.springframework.beans.factory.config.RuntimeBeanReference registerPathMatcher(@Nullable org.springframework.beans.factory.config.RuntimeBeanReference pathMatcherRef, org.springframework.beans.factory.xml.ParserContext context, @Nullable Object source)
      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.
      Returns:
      a RuntimeBeanReference to this PathMatcher instance
    • registerCorsConfigurations

      public static org.springframework.beans.factory.config.RuntimeBeanReference registerCorsConfigurations(@Nullable Map<String,org.springframework.web.cors.CorsConfiguration> corsConfigurations, org.springframework.beans.factory.xml.ParserContext context, @Nullable Object source)
      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.
      Returns:
      a RuntimeBeanReference to this Map<String, CorsConfiguration> instance
    • getContentNegotiationManager

      @Nullable public static Object getContentNegotiationManager(org.springframework.beans.factory.xml.ParserContext context)
      Find the ContentNegotiationManager bean created by or registered with the annotation-driven element.
      Returns:
      a bean definition, bean reference, or null if none defined