クラス WebFluxIntegrationRequestMappingHandlerMapping

実装されているすべてのインターフェース:
EventListenerSEAwareBeanNameAwareBeanPostProcessorDestructionAwareBeanPostProcessorInitializingBeanApplicationContextAwareApplicationListener<ContextRefreshedEvent>EmbeddedValueResolverAwareOrderedHandlerMapping

public class WebFluxIntegrationRequestMappingHandlerMapping extends RequestMappingHandlerMapping implements ApplicationListener<ContextRefreshedEvent>, DestructionAwareBeanPostProcessor
<inbound-channel-adapter/> および <inbound-gateway/> 要素の Spring Integration HTTP 構成から HttpRequestHandlingEndpointSupportRequestMappingInfo を検出および登録する 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 の破棄中に登録を解除します。

導入:
5.0
作成者:
Artem Bilan, Gary Russell, Ngoc Nhan
関連事項: