クラス WebFluxIntegrationRequestMappingHandlerMapping
- 実装済みのインターフェース一覧:
EventListenerSE、Aware、BeanNameAware、BeanPostProcessor、DestructionAwareBeanPostProcessor、InitializingBean、ApplicationContextAware、ApplicationListener<ContextRefreshedEvent>、EmbeddedValueResolverAware、Ordered、HandlerMapping
<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 の破棄中に登録を解除します。
- 導入:
- 5.0
- 作成者:
- Artem Bilan, Gary Russell, Ngoc Nhan
- 関連事項:
フィールド概要
クラス org.springframework.web.reactive.handler.AbstractHandlerMapping から継承されたフィールド
mappingsLoggerクラス org.springframework.context.support.ApplicationObjectSupport から継承されたフィールド
loggerインターフェース org.springframework.web.reactive.HandlerMapping から継承されたフィールド
BEST_MATCHING_HANDLER_ATTRIBUTE, BEST_MATCHING_PATTERN_ATTRIBUTE, MATRIX_VARIABLES_ATTRIBUTE, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTEインターフェース org.springframework.core.Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEコンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明voidprotected voiddetectHandlerMethods(ObjectSE handler) protected CorsConfigurationinitCorsConfiguration(ObjectSE handler, MethodSE method, RequestMappingInfo mappingInfo) protected booleanvoidHttpRequestHandlingEndpointSupportは自動作成されたrequestChannelに依存する可能性があるため、MVC ハンドラーの検出は可能な限り遅く延期する必要があります。voidpostProcessBeforeDestruction(ObjectSE bean, StringSE beanName) postProcessBeforeInitialization(ObjectSE bean, StringSE beanName) booleanrequiresDestruction(ObjectSE bean) クラス org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerMapping から継承されたメソッド
createRequestMappingInfo, createRequestMappingInfo, getContentTypeResolver, getCustomMethodCondition, getCustomTypeCondition, getMappingForMethod, getPathPrefixes, registerHandlerMethod, registerMapping, resolveEmbeddedValuesInPatterns, setContentTypeResolver, setEmbeddedValueResolver, setPathPrefixesクラス org.springframework.web.reactive.result.method.RequestMappingInfoHandlerMapping から継承されたメソッド
getDirectPaths, getHandlerInternal, getMappingComparator, getMatchingMapping, handleMatch, handleNoMatchクラス org.springframework.web.reactive.result.method.AbstractHandlerMethodMapping から継承されたメソッド
createHandlerMethod, getCorsConfiguration, getHandlerMethods, handlerMethodsInitialized, hasCorsConfigurationSource, initHandlerMethods, lookupHandlerMethod, unregisterMappingクラス org.springframework.web.reactive.handler.AbstractHandlerMapping から継承されたメソッド
formatMappingName, getCorsProcessor, getHandler, getOrder, getPathPatternParser, setBeanName, setCorsConfigurations, setCorsConfigurationSource, setCorsProcessor, setOrder, setUseCaseSensitiveMatch, setUseTrailingSlashMatchクラス org.springframework.context.support.ApplicationObjectSupport から継承されたメソッド
getApplicationContext, getMessageSourceAccessor, initApplicationContext, initApplicationContext, isContextRequired, obtainApplicationContext, requiredContextClass, setApplicationContextクラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース org.springframework.context.ApplicationListener から継承されたメソッド
supportsAsyncExecutionインターフェース org.springframework.beans.factory.config.BeanPostProcessor から継承されたメソッド
postProcessAfterInitialization
コンストラクターの詳細
WebFluxIntegrationRequestMappingHandlerMapping
public WebFluxIntegrationRequestMappingHandlerMapping()
方法の詳細
postProcessBeforeInitialization
public ObjectSE postProcessBeforeInitialization(ObjectSE bean, StringSE beanName) throws BeansException - 次で指定:
- インターフェース
BeanPostProcessor内のpostProcessBeforeInitialization - 例外:
BeansException
postProcessBeforeDestruction
- 次で指定:
- インターフェース
DestructionAwareBeanPostProcessor内のpostProcessBeforeDestruction - 例外:
BeansException
requiresDestruction
- 次で指定:
- インターフェース
DestructionAwareBeanPostProcessor内のrequiresDestruction
isHandler
- オーバーライド:
- クラス
RequestMappingHandlerMappingのisHandler
detectHandlerMethods
- オーバーライド:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>のdetectHandlerMethods
initCorsConfiguration
protected CorsConfiguration initCorsConfiguration(ObjectSE handler, MethodSE method, RequestMappingInfo mappingInfo) - オーバーライド:
- クラス
RequestMappingHandlerMappingのinitCorsConfiguration
onApplicationEvent
HttpRequestHandlingEndpointSupportは自動作成されたrequestChannelに依存する可能性があるため、MVC ハンドラーの検出は可能な限り遅く延期する必要があります。- 次で指定:
- インターフェース
ApplicationListener<ContextRefreshedEvent>内のonApplicationEvent - 関連事項:
afterPropertiesSet
public void afterPropertiesSet()- 次で指定:
- インターフェース
InitializingBean内のafterPropertiesSet - オーバーライド:
- クラス
RequestMappingHandlerMappingのafterPropertiesSet