org.springframework.web.servlet.config

Class MvcNamespaceUtils

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


  • public abstract class MvcNamespaceUtils
    extends java.lang.Object
    Convenience methods for use in MVC namespace BeanDefinitionParsers.
    Since:
    3.1
    Author:
    Rossen Stoyanchev, Brian Clozel
    • Constructor Detail

      • MvcNamespaceUtils

        public MvcNamespaceUtils()
    • Method Detail

      • registerDefaultComponents

        public static void registerDefaultComponents(ParserContext parserContext,
                                                     @Nullable
                                                     java.lang.Object source)
      • registerCorsConfigurations

        public static RuntimeBeanReference registerCorsConfigurations(@Nullable
                                                                      java.util.Map<java.lang.String,CorsConfiguration> corsConfigurations,
                                                                      ParserContext context,
                                                                      @Nullable
                                                                      java.lang.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 java.lang.Object getContentNegotiationManager(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