クラス 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
- 関連事項:
フィールドのサマリー
クラス 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
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明protected void
現在の ApplicationContext にあるすべてのハンドラーを登録します。protected abstract StringSE[]
determineUrlsForHandler
(StringSE beanName) 指定されたハンドラー Bean の URL を判別します。void
スーパークラスの初期化に加えて、detectHandlers()
メソッドを呼び出します。void
setDetectHandlersInAncestorContexts
(boolean detectHandlersInAncestorContexts) 祖先 ApplicationContexts でハンドラー Bean を検出するかどうかを設定します。クラス org.springframework.web.servlet.handler.AbstractUrlHandlerMapping から継承されたメソッド
buildPathExposingHandler, exposePathWithinMapping, exposeUriTemplateVariables, getHandlerInternal, getHandlerMap, getPathPatternHandlerMap, getRootHandler, lookupHandler, lookupHandler, match, registerHandler, registerHandler, setLazyInitHandlers, setPatternParser, setRootHandler, setUseTrailingSlashMatch, supportsTypeLevelMappings, unregisterHandler, useTrailingSlashMatch, validateHandler
クラス org.springframework.web.servlet.handler.AbstractHandlerMapping から継承されたメソッド
adaptInterceptor, detectMappedInterceptors, extendInterceptors, formatMappingName, getAdaptedInterceptors, getCorsConfiguration, getCorsConfigurationSource, getCorsHandlerExecutionChain, getCorsProcessor, getDefaultHandler, getHandler, getHandlerExecutionChain, getMappedInterceptors, getOrder, getPathMatcher, getPatternParser, getUrlPathHelper, hasCorsConfigurationSource, 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.web.servlet.HandlerMapping から継承されたメソッド
getHandler, usesPathPatterns
インターフェース org.springframework.web.servlet.handler.MatchableHandlerMapping から継承されたメソッド
getPatternParser
コンストラクターの詳細
AbstractDetectingUrlHandlerMapping
public AbstractDetectingUrlHandlerMapping()
メソッドの詳細
setDetectHandlersInAncestorContexts
public void setDetectHandlersInAncestorContexts(boolean detectHandlersInAncestorContexts) 祖先 ApplicationContexts でハンドラー Bean を検出するかどうかを設定します。デフォルトは「false」: 現在の ApplicationContext のハンドラー Bean のみが検出されます。つまり、この HandlerMapping 自体が定義されているコンテキスト(通常は現在の DispatcherServlet のコンテキスト)のみです。
このフラグをオンにして、祖先コンテキスト(通常は Spring ルート WebApplicationContext)のハンドラー Bean も検出します。
initApplicationContext
スーパークラスの初期化に加えて、detectHandlers()
メソッドを呼び出します。detectHandlers
現在の ApplicationContext にあるすべてのハンドラーを登録します。ハンドラーの実際の URL 決定は、具体的な
determineUrlsForHandler(String)
実装によって異なります。そのような URL を決定できなかった Bean は、単にハンドラーとは見なされません。- 例外:
BeansException
- ハンドラーを登録できなかった場合- 関連事項:
determineUrlsForHandler
指定されたハンドラー Bean の URL を判別します。- パラメーター:
beanName
- 候補者 Bean の名前- 戻り値:
- Bean 用に決定された URL。存在しない場合は空の配列