public abstract class MvcNamespaceUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
BEAN_NAME_URL_HANDLER_MAPPING_BEAN_NAME |
private static java.lang.String |
CORS_CONFIGURATION_BEAN_NAME |
private static java.lang.String |
HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME |
private static java.lang.String |
HTTP_REQUEST_HANDLER_ADAPTER_BEAN_NAME |
private static java.lang.String |
PATH_MATCHER_BEAN_NAME |
private static java.lang.String |
SIMPLE_CONTROLLER_HANDLER_ADAPTER_BEAN_NAME |
private static java.lang.String |
URL_PATH_HELPER_BEAN_NAME |
Constructor and Description |
---|
MvcNamespaceUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
getContentNegotiationManager(ParserContext context)
Find the
ContentNegotiationManager bean created by or registered
with the annotation-driven element. |
private static void |
registerBeanNameUrlHandlerMapping(ParserContext context,
java.lang.Object source)
Registers an
HttpRequestHandlerAdapter under a well-known
name unless already registered. |
static RuntimeBeanReference |
registerCorsConfigurations(java.util.Map<java.lang.String,CorsConfiguration> corsConfigurations,
ParserContext context,
java.lang.Object source)
Registers a
Map<String, CorsConfiguration> (mapped CorsConfiguration s)
under a well-known name unless already registered. |
static void |
registerDefaultComponents(ParserContext parserContext,
java.lang.Object source) |
private static void |
registerHandlerMappingIntrospector(ParserContext parserContext,
java.lang.Object source)
Registers an
HandlerMappingIntrospector under a well-known name
unless already registered. |
private static void |
registerHttpRequestHandlerAdapter(ParserContext context,
java.lang.Object source)
Registers an
HttpRequestHandlerAdapter under a well-known
name unless already registered. |
static RuntimeBeanReference |
registerPathMatcher(RuntimeBeanReference pathMatcherRef,
ParserContext parserContext,
java.lang.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. |
private static void |
registerSimpleControllerHandlerAdapter(ParserContext context,
java.lang.Object source)
Registers a
SimpleControllerHandlerAdapter under a well-known
name unless already registered. |
static RuntimeBeanReference |
registerUrlPathHelper(RuntimeBeanReference urlPathHelperRef,
ParserContext parserContext,
java.lang.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. |
private static final java.lang.String BEAN_NAME_URL_HANDLER_MAPPING_BEAN_NAME
private static final java.lang.String SIMPLE_CONTROLLER_HANDLER_ADAPTER_BEAN_NAME
private static final java.lang.String HTTP_REQUEST_HANDLER_ADAPTER_BEAN_NAME
private static final java.lang.String URL_PATH_HELPER_BEAN_NAME
private static final java.lang.String PATH_MATCHER_BEAN_NAME
private static final java.lang.String CORS_CONFIGURATION_BEAN_NAME
private static final java.lang.String HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME
public static void registerDefaultComponents(ParserContext parserContext, java.lang.Object source)
public static RuntimeBeanReference registerUrlPathHelper(RuntimeBeanReference urlPathHelperRef, ParserContext parserContext, java.lang.Object source)
UrlPathHelper
under that well-known name, unless already registered.UrlPathHelper
instancepublic static RuntimeBeanReference registerPathMatcher(RuntimeBeanReference pathMatcherRef, ParserContext parserContext, java.lang.Object source)
PathMatcher
under that well-known name, unless already registered.PathMatcher
instanceprivate static void registerBeanNameUrlHandlerMapping(ParserContext context, java.lang.Object source)
HttpRequestHandlerAdapter
under a well-known
name unless already registered.private static void registerHttpRequestHandlerAdapter(ParserContext context, java.lang.Object source)
HttpRequestHandlerAdapter
under a well-known
name unless already registered.private static void registerSimpleControllerHandlerAdapter(ParserContext context, java.lang.Object source)
SimpleControllerHandlerAdapter
under a well-known
name unless already registered.public static RuntimeBeanReference registerCorsConfigurations(java.util.Map<java.lang.String,CorsConfiguration> corsConfigurations, ParserContext context, java.lang.Object source)
Map<String, CorsConfiguration>
(mapped CorsConfiguration
s)
under a well-known name unless already registered. The bean definition may be updated
if a non-null CORS configuration is provided.Map<String, CorsConfiguration>
instanceprivate static void registerHandlerMappingIntrospector(ParserContext parserContext, java.lang.Object source)
HandlerMappingIntrospector
under a well-known name
unless already registered.public static java.lang.Object getContentNegotiationManager(ParserContext context)
ContentNegotiationManager
bean created by or registered
with the annotation-driven
element.null
if none defined