クラス AbstractDetectingUrlHandlerMapping
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.AbstractUrlHandlerMapping
org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping
- 実装されているすべてのインターフェース:
Aware, BeanNameAware, ApplicationContextAware, Ordered, ServletContextAware, MatchableHandlerMapping, HandlerMapping
- 既知の直属サブクラス
BeanNameUrlHandlerMapping
HandlerMapping インターフェースの抽象的な実装。アプリケーションコンテキストで定義されたすべての Bean のイントロスペクションを通じてハンドラー Bean の URL マッピングを検出します。- 導入:
- 2.5
- 作成者:
- Juergen Hoeller
- 関連事項:
フィールドのサマリー
クラス 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 void現在の ApplicationContext にあるすべてのハンドラーを登録します。protected abstract StringSE[]determineUrlsForHandler(StringSE beanName) 指定されたハンドラー Bean の URL を判別します。voidスーパークラスの初期化に加えて、detectHandlers()メソッドを呼び出します。voidsetDetectHandlersInAncestorContexts(boolean detectHandlersInAncestorContexts) 祖先 ApplicationContexts でハンドラー Bean を検出するかどうかを設定します。クラス AbstractUrlHandlerMapping から継承されたメソッド
buildPathExposingHandler, exposePathWithinMapping, exposeUriTemplateVariables, getHandlerInternal, getHandlerMap, getPathPatternHandlerMap, getRootHandler, lookupHandler, lookupHandler, match, registerHandler, registerHandler, setLazyInitHandlers, setPatternParser, setRootHandler, supportsTypeLevelMappings, unregisterHandler, validateHandlerクラス AbstractHandlerMapping から継承されたメソッド
adaptInterceptor, detectMappedInterceptors, extendInterceptors, formatMappingName, getAdaptedInterceptors, getApiVersionStrategy, getCorsConfiguration, getCorsConfigurationSource, getCorsHandlerExecutionChain, getCorsProcessor, getDefaultHandler, getHandler, getHandlerExecutionChain, getMappedInterceptors, getOrder, getPathMatcher, getPatternParser, getUrlPathHelper, hasCorsConfigurationSource, initInterceptors, initLookupPath, setAlwaysUseFullPath, setApiVersionStrategy, setBeanName, setCorsConfigurations, setCorsConfigurationSource, setCorsProcessor, setDefaultHandler, setInterceptors, setOrder, setPathMatcher, setRemoveSemicolonContent, setUrlDecode, setUrlPathHelper, usesPathPatternsクラス WebApplicationObjectSupport から継承されたメソッド
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextクラス ApplicationObjectSupport から継承されたメソッド
getApplicationContext, getMessageSourceAccessor, obtainApplicationContext, requiredContextClass, setApplicationContextクラス ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース HandlerMapping から継承されたメソッド
getHandler, usesPathPatternsインターフェース MatchableHandlerMapping から継承されたメソッド
getPatternParser
コンストラクターの詳細
AbstractDetectingUrlHandlerMapping
public AbstractDetectingUrlHandlerMapping()
メソッドの詳細
setDetectHandlersInAncestorContexts
public void setDetectHandlersInAncestorContexts(boolean detectHandlersInAncestorContexts) 祖先 ApplicationContexts でハンドラー Bean を検出するかどうかを設定します。デフォルトは「false」: 現在の ApplicationContext のハンドラー Bean のみが検出されます。つまり、この HandlerMapping 自体が定義されているコンテキスト(通常は現在の DispatcherServlet のコンテキスト)のみです。
このフラグをオンにして、祖先コンテキスト(通常は Spring ルート WebApplicationContext)のハンドラー Bean も検出します。
initApplicationContext
スーパークラスの初期化に加えて、detectHandlers()メソッドを呼び出します。- オーバーライド:
- クラス
AbstractHandlerMappingのinitApplicationContext - 例外:
ApplicationContextException- 初期化エラーの場合- 関連事項:
detectHandlers
現在の ApplicationContext にあるすべてのハンドラーを登録します。ハンドラーの実際の URL 決定は、具体的な
determineUrlsForHandler(String)実装によって異なります。そのような URL を決定できなかった Bean は、単にハンドラーとは見なされません。- 例外:
BeansException- ハンドラーを登録できなかった場合- 関連事項:
determineUrlsForHandler