クラス AbstractAnnotationConfigDispatcherServletInitializer
java.lang.ObjectSE
org.springframework.web.context.AbstractContextLoaderInitializer
org.springframework.web.servlet.support.AbstractDispatcherServletInitializer
org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer
- 実装されているすべてのインターフェース:
- WebApplicationInitializer
public abstract class AbstractAnnotationConfigDispatcherServletInitializer
extends AbstractDispatcherServletInitializer
DispatcherServlet を登録し、Java ベースの Spring 構成を使用する WebApplicationInitializer。以下を実装するには実装が必要です。
- getRootConfigClasses()--「ルート」アプリケーションコンテキスト(非 Web インフラストラクチャ)構成用。
- getServletConfigClasses()--- DispatcherServletアプリケーションコンテキスト (Spring MVC インフラストラクチャ) 構成用。
 アプリケーションコンテキスト階層が不要な場合、アプリケーションは getRootConfigClasses() を介してすべての構成を返し、getServletConfigClasses() から null を返すことがあります。
- 導入:
- 3.2
- 作成者:
- Arjen Poutsma, Chris Beams
- フィールドのサマリー- クラス org.springframework.web.servlet.support.AbstractDispatcherServletInitializer から継承されたフィールド- DEFAULT_SERVLET_NAME- クラス org.springframework.web.context.AbstractContextLoaderInitializer から継承されたフィールド- logger
- コンストラクターの概要コンストラクター
- メソッドのサマリー修飾子と型メソッド説明- protected WebApplicationContext- ContextLoaderListenerに提供される「ルート」アプリケーションコンテキストを作成します。- protected WebApplicationContext- DispatcherServletに提供されるサーブレットアプリケーションコンテキストを作成します。- protected abstract ClassSE<?>[]- protected abstract ClassSE<?>[]- クラス org.springframework.web.servlet.support.AbstractDispatcherServletInitializer から継承されたメソッド- createDispatcherServlet, customizeRegistration, getServletApplicationContextInitializers, getServletFilters, getServletMappings, getServletName, isAsyncSupported, onStartup, registerDispatcherServlet, registerServletFilter- クラス org.springframework.web.context.AbstractContextLoaderInitializer から継承されたメソッド- getRootApplicationContextInitializers, registerContextLoaderListener
- コンストラクターの詳細- AbstractAnnotationConfigDispatcherServletInitializerpublic AbstractAnnotationConfigDispatcherServletInitializer()
 
- メソッドの詳細- createRootApplicationContext- ContextLoaderListenerに提供される「ルート」アプリケーションコンテキストを作成します。- 返されたコンテキストは - ContextLoaderListener(WebApplicationContext)に委譲され、- DispatcherServletアプリケーションコンテキストの親コンテキストとして確立されます。そのため、通常、中間層サービス、データソースなどが含まれます。- この実装は - AnnotationConfigWebApplicationContextを作成し、- getRootConfigClasses()によって返されるアノテーション付きクラスを提供します。- getRootConfigClasses()が- nullを返す場合、- nullを返します。- 次で指定:
-  クラス AbstractContextLoaderInitializerのcreateRootApplicationContext
- 戻り値:
-  ルートアプリケーションコンテキスト、またはルートコンテキストが望ましくない場合は null
- 関連事項:
 
- createServletApplicationContext- DispatcherServletに提供されるサーブレットアプリケーションコンテキストを作成します。- 返されたコンテキストは、Spring の - DispatcherServlet(WebApplicationContext)に委譲されます。そのため、通常、コントローラー、ビューリゾルバー、ロケールリゾルバー、その他の Web 関連の Bean が含まれます。- この実装は - AnnotationConfigWebApplicationContextを作成し、- getServletConfigClasses()によって返されるアノテーション付きクラスを提供します。
- getRootConfigClasses- 戻り値:
-  ルートアプリケーションコンテキストの設定、またはルートコンテキストの作成と登録が望ましくない場合は null
 
- getServletConfigClasses- 戻り値:
-  サーブレットアプリケーションコンテキストの構成、またはすべての構成がルート構成クラスを介して指定されている場合は null