public class WebFluxIntegrationRequestMappingHandlerMapping
extends org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerMapping
implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
HandlerMapping implementation that
detects and registers RequestMappingInfos for
HttpRequestHandlingEndpointSupport
from a Spring Integration HTTP configuration
of <inbound-channel-adapter/> and <inbound-gateway/> elements.
This class is automatically configured as a bean in the application context during the
parsing phase of the <inbound-gateway/>
elements, if there is none registered, yet. However it can be configured as a regular
bean with appropriate configuration for
RequestMappingHandlerMapping.
It is recommended to have only one similar bean in the application context using the 'id'
WebFluxContextUtils.HANDLER_MAPPING_BEAN_NAME.
In most cases, Spring MVC offers to configure Request Mapping via
org.springframework.stereotype.Controller and
RequestMapping.
That's why Spring MVC's Handler Mapping infrastructure relies on
HandlerMethod, as different methods at the same
org.springframework.stereotype.Controller user-class may have their own
RequestMapping.
On the other side, all Spring Integration HTTP Inbound Endpoints are configured on
the basis of the same HttpRequestHandlingEndpointSupport
class and there is no single RequestMappingInfo
configuration without HandlerMethod in Spring MVC.
Accordingly WebFluxIntegrationRequestMappingHandlerMapping is a
HandlerMapping
compromise implementation between method-level annotations and component-level
(e.g. Spring Integration XML) configurations.
RequestMapping,
RequestMappingHandlerMapping| Constructor and Description |
|---|
WebFluxIntegrationRequestMappingHandlerMapping() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected void |
detectHandlerMethods(java.lang.Object handler) |
protected org.springframework.web.cors.CorsConfiguration |
initCorsConfiguration(java.lang.Object handler,
java.lang.reflect.Method method,
org.springframework.web.reactive.result.method.RequestMappingInfo mappingInfo) |
protected boolean |
isHandler(java.lang.Class<?> beanType) |
void |
onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
HttpRequestHandlingEndpointSupports
may depend on auto-created requestChannels, so MVC Handlers detection should be postponed
as late as possible. |
createRequestMappingInfo, getContentTypeResolver, getCustomMethodCondition, getCustomTypeCondition, getMappingForMethod, resolveEmbeddedValuesInPatterns, setContentTypeResolver, setEmbeddedValueResolvergetMappingComparator, getMatchingMapping, handleMatch, handleNoMatchcreateHandlerMethod, getCorsConfiguration, getHandlerInternal, getHandlerMethods, handlerMethodsInitialized, initHandlerMethods, lookupHandlerMethod, registerHandlerMethod, registerMapping, unregisterMappinggetCorsProcessor, getHandler, getOrder, getPathPatternParser, setCorsConfigurations, setCorsProcessor, setOrder, setUseCaseSensitiveMatch, setUseTrailingSlashMatchpublic WebFluxIntegrationRequestMappingHandlerMapping()
protected boolean isHandler(java.lang.Class<?> beanType)
isHandler in class org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerMappingprotected void detectHandlerMethods(java.lang.Object handler)
detectHandlerMethods in class org.springframework.web.reactive.result.method.AbstractHandlerMethodMapping<org.springframework.web.reactive.result.method.RequestMappingInfo>protected org.springframework.web.cors.CorsConfiguration initCorsConfiguration(java.lang.Object handler,
java.lang.reflect.Method method,
org.springframework.web.reactive.result.method.RequestMappingInfo mappingInfo)
initCorsConfiguration in class org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerMappingpublic void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
HttpRequestHandlingEndpointSupports
may depend on auto-created requestChannels, so MVC Handlers detection should be postponed
as late as possible.onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>RequestMappingHandlerMapping.afterPropertiesSet()public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerMapping