クラス IntegrationRequestMappingHandlerMapping
- 実装されたすべてのインターフェース:
EventListenerSE
、Aware
、BeanNameAware
、InitializingBean
、ApplicationContextAware
、ApplicationListener<ContextRefreshedEvent>
、EmbeddedValueResolverAware
、Ordered
、ServletContextAware
、MatchableHandlerMapping
、HandlerMapping
<inbound-channel-adapter/>
および <inbound-gateway/>
要素の Spring Integration HTTP 構成から HttpRequestHandlingEndpointSupport
の RequestMappingInfo
を検出および登録する HandlerMapping
実装。 このクラスは、<inbound-channel-adapter/>
および <inbound-gateway/>
要素の解析フェーズ中に、まだ何も登録されていない場合、アプリケーションコンテキストで Bean として自動的に構成されます。ただし、RequestMappingHandlerMapping
の適切な構成を使用して、通常の Bean として構成できます。'id' HttpContextUtils.HANDLER_MAPPING_BEAN_NAME
を使用して、アプリケーションコンテキスト内に同様の Bean を 1 つだけ持つことをお勧めします。
ほとんどの場合、Spring MVC は org.springframework.stereotype.Controller
および RequestMapping
を介してリクエストマッピングを構成することを提案します。これが、Spring MVC のハンドラーマッピングインフラストラクチャが HandlerMethod
に依存している理由です。同じ org.springframework.stereotype.Controller
ユーザークラスの異なるメソッドが独自の RequestMapping
を持つ場合があるためです。一方、すべての Spring Integration HTTP 受信 エンドポイントは、同じ BaseHttpInboundEndpoint
クラスに基づいて構成されており、Spring MVC に HandlerMethod
がない単一の RequestMappingInfo
構成はありません。IntegrationRequestMappingHandlerMapping
は、メソッドレベルのアノテーションとコンポーネントレベル (Spring Integration XML など) の構成の間の HandlerMapping
妥協の実装です。
このクラスは Spring MVC RequestMappingHandlerMapping
クラスを継承し、そのロジックのほとんど、特に RequestMappingInfoHandlerMapping.handleNoMatch(java.util.Set, String, HttpServletRequest)
を継承します。これは、何らかの理由でマッピングが一致しない場合に HTTP レスポンスに対して特定の 4xx
エラーをスローし、アプリケーションコンテキスト内の残りのマッピングハンドラーへの呼び出しを防ぎます。このため、Spring Integration と Spring MVC の両方のリクエストマッピングに同じパスを設定することはサポートされていません(たとえば、一方に `POST`、もう一方に `GET`)。MVC マッピングは見つかりません。
- 導入:
- 3.0
- 作成者:
- Artem Bilan, Gary Russell
- 関連事項:
フィールドサマリー
クラス org.springframework.web.servlet.handler.AbstractHandlerMapping から継承されたフィールド
mappingsLogger
クラス org.springframework.context.support.ApplicationObjectSupport から継承されたフィールド
logger
インターフェース org.springframework.web.servlet.HandlerMapping から継承されたフィールド
BEST_MATCHING_HANDLER_ATTRIBUTE, BEST_MATCHING_PATTERN_ATTRIBUTE, INTROSPECT_TYPE_LEVEL_MAPPING, LOOKUP_PATH, MATRIX_VARIABLES_ATTRIBUTE, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTE
インターフェース org.springframework.core.Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターのサマリー
メソッドのサマリー
修飾子と型メソッド説明void
protected void
detectHandlerMethods
(ObjectSE handlerArg) protected CorsConfiguration
getCorsConfiguration
(ObjectSE handler, HttpServletRequestEE request) protected HandlerExecutionChain
getHandlerExecutionChain
(ObjectSE handlerArg, HttpServletRequestEE request) protected CorsConfiguration
initCorsConfiguration
(ObjectSE handler, MethodSE method, RequestMappingInfo mappingInfo) protected boolean
void
HttpRequestHandlingEndpointSupport
は自動作成されたrequestChannel
に依存する可能性があるため、MVC ハンドラーの検出は可能な限り遅く延期する必要があります。クラス org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping から継承されたメソッド
createRequestMappingInfo, createRequestMappingInfo, getBuilderConfiguration, getContentNegotiationManager, getCustomMethodCondition, getCustomTypeCondition, getFileExtensions, getMappingForMethod, getPathPrefixes, match, registerHandlerMethod, registerMapping, resolveEmbeddedValuesInPatterns, setContentNegotiationManager, setEmbeddedValueResolver, setPathPrefixes, setPatternParser, setUseRegisteredSuffixPatternMatch, setUseSuffixPatternMatch, setUseTrailingSlashMatch, useRegisteredSuffixPatternMatch, useSuffixPatternMatch, useTrailingSlashMatch
クラス org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping から継承されたメソッド
getDirectPaths, getHandlerInternal, getMappingComparator, getMappingPathPatterns, getMatchingMapping, handleMatch, handleNoMatch
クラス org.springframework.web.servlet.handler.AbstractHandlerMethodMapping から継承されたメソッド
createHandlerMethod, getCandidateBeanNames, getHandlerMethods, getHandlerMethodsForMappingName, getNamingStrategy, handlerMethodsInitialized, hasCorsConfigurationSource, initHandlerMethods, lookupHandlerMethod, processCandidateBean, setDetectHandlerMethodsInAncestorContexts, setHandlerMethodMappingNamingStrategy, unregisterMapping
クラス org.springframework.web.servlet.handler.AbstractHandlerMapping から継承されたメソッド
adaptInterceptor, detectMappedInterceptors, extendInterceptors, formatMappingName, getAdaptedInterceptors, getCorsConfigurationSource, getCorsHandlerExecutionChain, getCorsProcessor, getDefaultHandler, getHandler, getMappedInterceptors, getOrder, getPathMatcher, getPatternParser, getUrlPathHelper, initApplicationContext, initInterceptors, initLookupPath, setAlwaysUseFullPath, setBeanName, setCorsConfigurations, setCorsConfigurationSource, setCorsProcessor, setDefaultHandler, setInterceptors, setOrder, setPathMatcher, setRemoveSemicolonContent, setUrlDecode, setUrlPathHelper, usesPathPatterns
クラス org.springframework.web.context.support.WebApplicationObjectSupport から継承されたメソッド
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
クラス org.springframework.context.support.ApplicationObjectSupport から継承されたメソッド
getApplicationContext, getMessageSourceAccessor, obtainApplicationContext, requiredContextClass, setApplicationContext
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.context.ApplicationListener から継承されたメソッド
supportsAsyncExecution
インターフェース org.springframework.web.servlet.HandlerMapping から継承されたメソッド
getHandler, usesPathPatterns
インターフェース org.springframework.web.servlet.handler.MatchableHandlerMapping から継承されたメソッド
getPatternParser
コンストラクターの詳細
IntegrationRequestMappingHandlerMapping
public IntegrationRequestMappingHandlerMapping()
メソッドの詳細
isHandler
- オーバーライド:
- クラス
RequestMappingHandlerMapping
のisHandler
getHandlerExecutionChain
protected HandlerExecutionChain getHandlerExecutionChain(ObjectSE handlerArg, HttpServletRequestEE request) - オーバーライド:
- クラス
AbstractHandlerMapping
のgetHandlerExecutionChain
getCorsConfiguration
- オーバーライド:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>
のgetCorsConfiguration
detectHandlerMethods
- オーバーライド:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>
のdetectHandlerMethods
initCorsConfiguration
protected CorsConfiguration initCorsConfiguration(ObjectSE handler, MethodSE method, RequestMappingInfo mappingInfo) - オーバーライド:
- クラス
RequestMappingHandlerMapping
のinitCorsConfiguration
onApplicationEvent
HttpRequestHandlingEndpointSupport
は自動作成されたrequestChannel
に依存する可能性があるため、MVC ハンドラーの検出は可能な限り遅く延期する必要があります。afterPropertiesSet
public void afterPropertiesSet()- 次で指定:
- インターフェース
InitializingBean
のafterPropertiesSet
- オーバーライド:
- クラス
RequestMappingHandlerMapping
のafterPropertiesSet