クラス RequestMappingInfoHandlerMapping
java.lang.ObjectSE
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.handler.AbstractHandlerMapping
org.springframework.web.servlet.handler.AbstractHandlerMethodMapping<RequestMappingInfo>
org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping
- 実装されているすべてのインターフェース:
Aware, BeanNameAware, InitializingBean, ApplicationContextAware, Ordered, ServletContextAware, HandlerMapping
- 既知の直属サブクラス
RequestMappingHandlerMapping
public abstract class RequestMappingInfoHandlerMapping
extends AbstractHandlerMethodMapping<RequestMappingInfo>
RequestMappingInfo がリクエストとハンドラーメソッド間のマッピングを定義するクラスの抽象基本クラス。- 導入:
- 3.1
- 作成者:
- Arjen Poutsma, Rossen Stoyanchev
フィールドのサマリー
クラス AbstractHandlerMapping から継承されたフィールド
mappingsLoggerクラス ApplicationObjectSupport から継承されたフィールド
loggerインターフェース HandlerMapping から継承されたフィールド
API_VERSION_ATTRIBUTE, 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インターフェース Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEコンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明パターンではないリクエストマッピングパスを返します。protected @Nullable HandlerMethodgetHandlerInternal(jakarta.servlet.http.HttpServletRequest request) 指定されたリクエストのハンドラーメソッドを検索します。protected ComparatorSE<RequestMappingInfo> getMappingComparator(jakarta.servlet.http.HttpServletRequest request) リクエストに一致する RequestMappingInfos をソートするためのコンパレータを提供します。protected @Nullable RequestMappingInfogetMatchingMapping(RequestMappingInfo info, jakarta.servlet.http.HttpServletRequest request) 指定された RequestMappingInfo が現在のリクエストに一致するかどうかを確認し、現在のリクエストに一致する条件(たとえば、URL パターンのサブセット)で(潜在的に新しい)インスタンスを返します。protected voidhandleMatch(RequestMappingInfo info, StringSE lookupPath, jakarta.servlet.http.HttpServletRequest request) リクエストで URI テンプレート変数、マトリックス変数、作成可能なメディア型を公開します。protected @Nullable HandlerMethodhandleNoMatch(SetSE<RequestMappingInfo> infos, StringSE lookupPath, jakarta.servlet.http.HttpServletRequest request) すべての RequestMappingInfo をもう一度繰り返し、少なくとも URL で一致するものがあるかどうかを調べ、一致しないものに応じて例外を発生させます。クラス AbstractHandlerMethodMapping から継承されたメソッド
afterPropertiesSet, createHandlerMethod, detectHandlerMethods, getCandidateBeanNames, getCorsConfiguration, getHandlerMethods, getHandlerMethodsForMappingName, getMappingForMethod, getNamingStrategy, handlerMethodsInitialized, hasCorsConfigurationSource, initCorsConfiguration, initHandlerMethods, isHandler, lookupHandlerMethod, processCandidateBean, registerHandlerMethod, registerMapping, setDetectHandlerMethodsInAncestorContexts, setHandlerMethodMappingNamingStrategy, setPatternParser, unregisterMappingクラス AbstractHandlerMapping から継承されたメソッド
adaptInterceptor, detectMappedInterceptors, extendInterceptors, formatMappingName, getAdaptedInterceptors, getApiVersionStrategy, getCorsConfigurationSource, getCorsHandlerExecutionChain, getCorsProcessor, getDefaultHandler, getHandler, getHandlerExecutionChain, getMappedInterceptors, getOrder, getPathMatcher, getPatternParser, getUrlPathHelper, initApplicationContext, initInterceptors, initLookupPath, setAlwaysUseFullPath, setApiVersionStrategy, setBeanName, setCorsConfigurations, setCorsConfigurationSource, setCorsProcessor, setDefaultHandler, setInterceptors, setOrder, setPathMatcher, setRemoveSemicolonContent, setUrlDecode, setUrlPathHelper, usesPathPatternsクラス WebApplicationObjectSupport から継承されたメソッド
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
コンストラクターの詳細
RequestMappingInfoHandlerMapping
protected RequestMappingInfoHandlerMapping()
メソッドの詳細
getDirectPaths
クラスからコピーされた説明:AbstractHandlerMethodMappingパターンではないリクエストマッピングパスを返します。- オーバーライド:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>のgetDirectPaths
getMatchingMapping
protected @Nullable RequestMappingInfo getMatchingMapping(RequestMappingInfo info, jakarta.servlet.http.HttpServletRequest request) 指定された RequestMappingInfo が現在のリクエストに一致するかどうかを確認し、現在のリクエストに一致する条件(たとえば、URL パターンのサブセット)で(潜在的に新しい)インスタンスを返します。- 次で指定:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>のgetMatchingMapping - パラメーター:
info- 一致を取得するマッピングrequest- 現在の HTTP サーブレットリクエスト- 戻り値:
- 一致した場合の情報。または、
null。
getMappingComparator
protected ComparatorSE<RequestMappingInfo> getMappingComparator(jakarta.servlet.http.HttpServletRequest request) リクエストに一致する RequestMappingInfos をソートするためのコンパレータを提供します。- 次で指定:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>のgetMappingComparator - パラメーター:
request- 現在のリクエスト- 戻り値:
- コンパレータ (非
null)
getHandlerInternal
protected @Nullable HandlerMethod getHandlerInternal(jakarta.servlet.http.HttpServletRequest request) throws ExceptionSE クラスからコピーされた説明:AbstractHandlerMethodMapping指定されたリクエストのハンドラーメソッドを検索します。- オーバーライド:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>のgetHandlerInternal - パラメーター:
request- 現在の HTTP リクエスト- 戻り値:
- 対応するハンドラーインスタンス。見つからない場合は
null - 例外:
ExceptionSE- 内部エラーがある場合
handleMatch
protected void handleMatch(RequestMappingInfo info, StringSE lookupPath, jakarta.servlet.http.HttpServletRequest request) リクエストで URI テンプレート変数、マトリックス変数、作成可能なメディア型を公開します。- オーバーライド:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>のhandleMatch - パラメーター:
info- 一致するマッピングlookupPath- 現在のサーブレットマッピング内のマッピングルックアップパスrequest- 現在のリクエスト- 関連事項:
handleNoMatch
protected @Nullable HandlerMethod handleNoMatch(SetSE<RequestMappingInfo> infos, StringSE lookupPath, jakarta.servlet.http.HttpServletRequest request) throws jakarta.servlet.ServletException すべての RequestMappingInfo をもう一度繰り返し、少なくとも URL で一致するものがあるかどうかを調べ、一致しないものに応じて例外を発生させます。- オーバーライド:
- クラス
AbstractHandlerMethodMapping<RequestMappingInfo>のhandleNoMatch - パラメーター:
infos- 登録済みのすべてのマッピングlookupPath- 現在のサーブレットマッピング内のマッピングルックアップパスrequest- 現在のリクエスト- 例外:
HttpRequestMethodNotSupportedException- HTTP メソッドではなく URL で一致する場合HttpMediaTypeNotAcceptableException- 消耗品 / 生産可能なメディア型ではなく、URL で一致する場合jakarta.servlet.ServletException- エラーの場合