public class WebFluxIntegrationRequestMappingHandlerMapping extends RequestMappingHandlerMapping implements ApplicationListener<ContextRefreshedEvent>, DestructionAwareBeanPostProcessor
<inbound-channel-adapter/> および <inbound-gateway/> 要素の Spring Integration HTTP 構成から HttpRequestHandlingEndpointSupport の RequestMappingInfo を検出および登録する HandlerMapping 実装。 このクラスは、まだ登録されていない場合、<inbound-gateway/> 要素の解析フェーズ中にアプリケーションコンテキストで Bean として自動的に構成されます。ただし、RequestMappingHandlerMapping に適切な構成で通常の Bean として構成できます。'id' WebFluxContextUtils.HANDLER_MAPPING_BEAN_NAME を使用して、アプリケーションコンテキストに類似の Bean を 1 つだけ含めることをお勧めします。
ほとんどの場合、Spring MVC は org.springframework.stereotype.Controller および RequestMapping を介してリクエストマッピングを構成することを提案します。これが、Spring MVC のハンドラーマッピングインフラストラクチャが HandlerMethod に依存している理由です。同じ org.springframework.stereotype.Controller ユーザークラスの異なるメソッドが独自の RequestMapping を持つ場合があるためです。一方、すべての Spring Integration HTTP 受信 エンドポイントは、同じ HttpRequestHandlingEndpointSupport クラスに基づいて構成されており、Spring MVC に HandlerMethod がない単一の RequestMappingInfo 構成はありません。WebFluxIntegrationRequestMappingHandlerMapping は、メソッドレベルのアノテーションとコンポーネントレベル (Spring Integration XML など) の構成の間の HandlerMapping 妥協の実装です。
バージョン 5.1 以降、このクラスは DestructionAwareBeanPostProcessor を実装して、動的に宣言された Bean の実行時に HTTP エンドポイントを登録します。IntegrationFlowContext を使用して、WebFluxInboundEndpoint の破棄中に登録を解除します。
RequestMapping, RequestMappingHandlerMappingloggerBEST_MATCHING_HANDLER_ATTRIBUTE, BEST_MATCHING_PATTERN_ATTRIBUTE, MATRIX_VARIABLES_ATTRIBUTE, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTEHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| コンストラクターと説明 |
|---|
WebFluxIntegrationRequestMappingHandlerMapping() |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | afterPropertiesSet() |
protected void | detectHandlerMethods(ObjectSE handler) |
protected CorsConfiguration | initCorsConfiguration(ObjectSE handler, MethodSE method, RequestMappingInfo mappingInfo) |
protected boolean | isHandler(ClassSE<?> beanType) |
void | onApplicationEvent(ContextRefreshedEvent event)HttpRequestHandlingEndpointSupport は自動作成された requestChannel に依存する可能性があるため、MVC ハンドラーの検出は可能な限り遅く延期する必要があります。 |
void | postProcessBeforeDestruction(ObjectSE bean, StringSE beanName) |
ObjectSE | postProcessBeforeInitialization(ObjectSE bean, StringSE beanName) |
boolean | requiresDestruction(ObjectSE bean) |
createRequestMappingInfo, getContentTypeResolver, getCustomMethodCondition, getCustomTypeCondition, getMappingForMethod, getPathPrefixes, registerHandlerMethod, registerMapping, resolveEmbeddedValuesInPatterns, setContentTypeResolver, setEmbeddedValueResolver, setPathPrefixesgetDirectPaths, getHandlerInternal, getMappingComparator, getMatchingMapping, handleMatch, handleNoMatchcreateHandlerMethod, getCorsConfiguration, getHandlerMethods, handlerMethodsInitialized, hasCorsConfigurationSource, initHandlerMethods, lookupHandlerMethod, unregisterMappingformatMappingName, getCorsProcessor, getHandler, getOrder, getPathPatternParser, setBeanName, setCorsConfigurations, setCorsConfigurationSource, setCorsProcessor, setOrder, setUseCaseSensitiveMatch, setUseTrailingSlashMatchgetApplicationContext, getMessageSourceAccessor, initApplicationContext, initApplicationContext, isContextRequired, obtainApplicationContext, requiredContextClass, setApplicationContextcloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEforPayloadpostProcessAfterInitializationpublic WebFluxIntegrationRequestMappingHandlerMapping()
public ObjectSE postProcessBeforeInitialization(ObjectSE bean, StringSE beanName) throws BeansException
BeanPostProcessor の postProcessBeforeInitialization BeansExceptionpublic void postProcessBeforeDestruction(ObjectSE bean, StringSE beanName) throws BeansException
DestructionAwareBeanPostProcessor の postProcessBeforeDestruction BeansExceptionpublic boolean requiresDestruction(ObjectSE bean)
DestructionAwareBeanPostProcessor の requiresDestruction protected boolean isHandler(ClassSE<?> beanType)
RequestMappingHandlerMapping の isHandler protected void detectHandlerMethods(ObjectSE handler)
AbstractHandlerMethodMapping<RequestMappingInfo> の detectHandlerMethods protected CorsConfiguration initCorsConfiguration(ObjectSE handler, MethodSE method, RequestMappingInfo mappingInfo)
RequestMappingHandlerMapping の initCorsConfiguration public void onApplicationEvent(ContextRefreshedEvent event)
HttpRequestHandlingEndpointSupport は自動作成された requestChannel に依存する可能性があるため、MVC ハンドラーの検出は可能な限り遅く延期する必要があります。public void afterPropertiesSet()
InitializingBean の afterPropertiesSet RequestMappingHandlerMapping の afterPropertiesSet