クラス RequestMappingHandlerMapping
java.lang.ObjectSE
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.reactive.handler.AbstractHandlerMapping
org.springframework.web.reactive.result.method.AbstractHandlerMethodMapping<RequestMappingInfo>
org.springframework.web.reactive.result.method.RequestMappingInfoHandlerMapping
org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerMapping
- 実装されたすべてのインターフェース:
Aware
、BeanNameAware
、InitializingBean
、ApplicationContextAware
、EmbeddedValueResolverAware
、Ordered
、HandlerMapping
public class RequestMappingHandlerMapping
extends RequestMappingInfoHandlerMapping
implements EmbeddedValueResolverAware
型レベルおよびメソッドレベルの
@RequestMapping
および @HttpExchange
アノテーションから RequestMappingInfo
インスタンスを作成する RequestMappingInfoHandlerMapping
の拡張機能。- 導入:
- 5.0
- 作成者:
- Rossen Stoyanchev, Sam Brannen, Olga Maciaszek-Sharma
フィールドのサマリー
クラス 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
コンストラクターのサマリー
コンストラクターメソッドのサマリー
修飾子と型メソッド説明void
初期化時にハンドラーメソッドを検出します。protected RequestMappingInfo
createRequestMappingInfo
(RequestMapping requestMapping, RequestCondition<?> customCondition) 提供された@RequestMapping
アノテーション、メタアノテーション、またはアノテーション階層内でアノテーション属性をマージした合成結果からRequestMappingInfo
を作成します。protected RequestMappingInfo
createRequestMappingInfo
(HttpExchange httpExchange, RequestCondition<?> customCondition) 提供された@HttpExchange
アノテーション、メタアノテーション、またはアノテーション階層内でアノテーション属性をマージした合成結果からRequestMappingInfo
を作成します。設定されたRequestedContentTypeResolver
を返します。protected RequestCondition<?>
getCustomMethodCondition
(MethodSE method) カスタムのメソッドレベルのリクエスト条件を提供する protected メソッド。protected RequestCondition<?>
getCustomTypeCondition
(ClassSE<?> handlerType) カスタムの型レベルのリクエスト条件を提供する protected メソッド。protected RequestMappingInfo
getMappingForMethod
(MethodSE method, ClassSE<?> handlerType) MapSE<StringSE,
PredicateSE<ClassSE<?>>> 構成されたパスは、読み取り専用の、おそらく空のマップとしてプレフィックスします。protected CorsConfiguration
initCorsConfiguration
(ObjectSE handler, MethodSE method, RequestMappingInfo mappingInfo) マッピングの CORS 設定を抽出して返します。protected boolean
指定された型がハンドラーメソッドを持つハンドラーかどうか。protected void
registerHandlerMethod
(ObjectSE handler, MethodSE method, RequestMappingInfo mapping) ハンドラーメソッドとその一意のマッピングを登録します。void
registerMapping
(RequestMappingInfo mapping, ObjectSE handler, MethodSE method) 指定されたマッピングを登録します。protected StringSE[]
resolveEmbeddedValuesInPatterns
(StringSE[] patterns) 指定されたパターンの配列のプレースホルダー値を解決します。void
setContentTypeResolver
(RequestedContentTypeResolver contentTypeResolver) リクエストされたメディア型を判別するために使用するRequestedContentTypeResolver
を設定します。void
setEmbeddedValueResolver
(StringValueResolver resolver) StringValueResolver を設定して、埋め込まれた定義値の解決に使用します。void
setPathPrefixes
(MapSE<StringSE, PredicateSE<ClassSE<?>>> prefixes) コントローラーメソッドに適用するパスプレフィックスを構成します。クラス org.springframework.web.reactive.result.method.RequestMappingInfoHandlerMapping から継承されたメソッド
getDirectPaths, getHandlerInternal, getMappingComparator, getMatchingMapping, handleMatch, handleNoMatch
クラス org.springframework.web.reactive.result.method.AbstractHandlerMethodMapping から継承されたメソッド
createHandlerMethod, detectHandlerMethods, 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
コンストラクターの詳細
RequestMappingHandlerMapping
public RequestMappingHandlerMapping()
メソッドの詳細
setPathPrefixes
コントローラーメソッドに適用するパスプレフィックスを構成します。プレフィックスは、コントローラー型がマップ内の対応する
Predicate
と一致するすべての@RequestMapping
メソッドおよび@HttpExchange
メソッドのマッピングを強化するために使用されます。入力マップの順序が予測可能であると仮定して、最初に一致する述語の接頭辞が使用されます。HandlerTypePredicate
を使用してコントローラーをグループ化することを検討してください。- パラメーター:
prefixes
- キーとしてパス接頭辞を持つマップ- 導入:
- 5.1
- 関連事項:
getPathPrefixes
構成されたパスは、読み取り専用の、おそらく空のマップとしてプレフィックスします。- 導入:
- 5.1
setContentTypeResolver
リクエストされたメディア型を判別するために使用するRequestedContentTypeResolver
を設定します。設定されていない場合、デフォルトのコンストラクターが使用されます。getContentTypeResolver
設定されたRequestedContentTypeResolver
を返します。setEmbeddedValueResolver
インターフェースからコピーされた説明:EmbeddedValueResolverAware
StringValueResolver を設定して、埋め込まれた定義値の解決に使用します。- 次で指定:
- インターフェース
EmbeddedValueResolverAware
のsetEmbeddedValueResolver
afterPropertiesSet
public void afterPropertiesSet()クラスからコピーされた説明:AbstractHandlerMethodMapping
初期化時にハンドラーメソッドを検出します。- 次で指定:
- インターフェース
InitializingBean
のafterPropertiesSet
- オーバーライド:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>
のafterPropertiesSet
isHandler
指定された型がハンドラーメソッドを持つハンドラーかどうか。ハンドラーが型レベルの @
Controller
アノテーションを持つことを期待します。- 次で指定:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>
のisHandler
- パラメーター:
beanType
- チェックされている Bean の型- 戻り値:
- これがハンドラー型の場合は "true"、そうでない場合は "false"。
getMappingForMethod
- 次で指定:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>
のgetMappingForMethod
- パラメーター:
method
- マッピングを提供する方法handlerType
- ハンドラー型、場合によってはメソッドの宣言クラスのサブ型- 戻り値:
- 作成された
RequestMappingInfo
、またはメソッドに@RequestMapping
または@HttpExchange
アノテーションがない場合はnull
- 関連事項:
getCustomTypeCondition
カスタムの型レベルのリクエスト条件を提供する protected メソッド。カスタム
RequestCondition
は、カスタムリクエスト条件を組み合わせて比較できるようにするために、このメソッドへのすべての呼び出しから同じ条件型が返される限り、任意の型にすることができます。カスタム条件型用に
AbstractRequestCondition
を継承し、CompositeRequestCondition
を使用して複数のカスタム条件を提供することを検討してください。- パラメーター:
handlerType
- 条件を作成するハンドラー型- 戻り値:
- 条件、または
null
getCustomMethodCondition
カスタムのメソッドレベルのリクエスト条件を提供する protected メソッド。カスタム
RequestCondition
は、カスタムリクエスト条件を組み合わせて比較できるようにするために、このメソッドへのすべての呼び出しから同じ条件型が返される限り、任意の型にすることができます。カスタム条件型用に
AbstractRequestCondition
を継承し、CompositeRequestCondition
を使用して複数のカスタム条件を提供することを検討してください。- パラメーター:
method
- 条件を作成するハンドラーメソッド- 戻り値:
- 条件、または
null
createRequestMappingInfo
protected RequestMappingInfo createRequestMappingInfo(RequestMapping requestMapping, @Nullable RequestCondition<?> customCondition) 提供された@RequestMapping
アノテーション、メタアノテーション、またはアノテーション階層内でアノテーション属性をマージした合成結果からRequestMappingInfo
を作成します。createRequestMappingInfo
protected RequestMappingInfo createRequestMappingInfo(HttpExchange httpExchange, @Nullable RequestCondition<?> customCondition) 提供された@HttpExchange
アノテーション、メタアノテーション、またはアノテーション階層内でアノテーション属性をマージした合成結果からRequestMappingInfo
を作成します。- 導入:
- 6.1
resolveEmbeddedValuesInPatterns
指定されたパターンの配列のプレースホルダー値を解決します。- 戻り値:
- 更新されたパターンを持つ新しい配列
registerMapping
クラスからコピーされた説明:AbstractHandlerMethodMapping
指定されたマッピングを登録します。このメソッドは、初期化が完了した後、実行時に呼び出すことができます。
- オーバーライド:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>
のregisterMapping
- パラメーター:
mapping
- ハンドラーメソッドのマッピングhandler
- ハンドラーmethod
- メソッド
registerHandlerMethod
クラスからコピーされた説明:AbstractHandlerMethodMapping
ハンドラーメソッドとその一意のマッピングを登録します。検出された各ハンドラーメソッドに対して起動時に呼び出されます。- オーバーライド:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>
のregisterHandlerMethod
- パラメーター:
handler
- ハンドラーまたはハンドラーインスタンスの Bean 名method
- 登録する方法mapping
- ハンドラーメソッドに関連付けられたマッピング条件
initCorsConfiguration
@Nullable protected CorsConfiguration initCorsConfiguration(ObjectSE handler, MethodSE method, RequestMappingInfo mappingInfo) クラスからコピーされた説明:AbstractHandlerMethodMapping
マッピングの CORS 設定を抽出して返します。- オーバーライド:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>
のinitCorsConfiguration