インターフェースの使用
org.springframework.context.ConfigurableApplicationContext
ConfigurableApplicationContext を使用するパッケージ
パッケージ
説明
このパッケージは、beans パッケージに基づいて構築され、メッセージソースと Observer デザインパターンのサポート、および一貫性のある API を使用してリソースを取得するアプリケーションオブジェクトの機能を追加します。
JSR-250「共通」アノテーション、コンポーネントスキャン、Spring 管理オブジェクトを作成するための Java ベースのメタデータなど、アプリケーションコンテキストのアノテーションサポート。
アプリケーションコンテキストの AOT サポート。
ApplicationContext 実装および MessageSource 実装の抽象基本クラスなど、org.springframework.context パッケージをサポートするクラス。
このパッケージには Spring TestContext フレームワークが含まれており、使用中の実際のテストフレームワークにとらわれないアノテーション駆動型ユニットおよび統合テストのサポートを提供します。
Spring TestContext フレームワークの事前 (AOT) サポート。
Spring TestContext フレームワークのサポートクラス。
Web は、Spring TestContext フレームワークのクラスをサポートします。
Web アプリケーションのアプリケーションコンテキストインターフェースのバリアントと、ルート Web アプリケーションコンテキストをブートストラップする ContextLoaderListener が含まれています。
WebApplicationContext 実装やさまざまなユーティリティクラスなど、
org.springframework.web.context パッケージをサポートするクラス。 アプリケーションコンテキストインフラストラクチャと統合するサーブレット、および Spring Web MVC フレームワークのコアインターフェースとクラスを提供します。
org.springframework.context 内の ConfigurableApplicationContext 使用
型の型パラメーターを持つ org.springframework.context のクラス ConfigurableApplicationContext修飾子と型インターフェース説明interfaceSpringConfigurableApplicationContextを初期化してからリフレッシュするためのコールバックインターフェース。org.springframework.context.annotation 内の ConfigurableApplicationContext 使用
修飾子と型クラス説明classコンポーネントクラスを入力として受け入れるスタンドアロンアプリケーションコンテキスト— 特に@Configurationアノテーション付きクラスだけでなく、プレーン@Component型およびjakarta.injectアノテーションを使用する JSR-330 準拠クラスも受け入れます。org.springframework.context.aot 内の ConfigurableApplicationContext 使用
型の型パラメーターを持つ org.springframework.context.aot のクラス ConfigurableApplicationContext修飾子と型インターフェース説明interface事前に生成された成果物を使用してConfigurableApplicationContextを初期化するために使用される特殊化されたApplicationContextInitializer。型 ConfigurableApplicationContext の型パラメーターを使用した org.springframework.context.aot のメソッド修飾子と型メソッド説明static <C extends ConfigurableApplicationContext>
AotApplicationContextInitializer<C>AotApplicationContextInitializer.forInitializerClasses(StringSE... initializerClassNames) 指定されたクラス名のセットからロードされた他の初期化子に委譲する新しいAotApplicationContextInitializerインスタンスを作成するファクトリメソッド。static <C extends ConfigurableApplicationContext>
ApplicationContextInitializer<C>AotApplicationContextInitializer.instantiateInitializer(StringSE initializerClassName, ClassLoaderSE classLoader) org.springframework.context.support 内の ConfigurableApplicationContext 使用
修飾子と型クラス説明classApplicationContextインターフェースの抽象的な実装。classAbstractApplicationContext.refresh()への複数の呼び出しをサポートすることになっているApplicationContext実装の基本クラスで、毎回新しい内部 Bean ファクトリインスタンスを作成します。class指定された構成の場所の一般的な処理を追加するAbstractRefreshableApplicationContextサブクラス。classApplicationContext実装の便利な基本クラス。XmlBeanDefinitionReaderが理解する Bean 定義を含む XML ドキュメントから構成を描画します。classスタンドアロン XML アプリケーションコンテキスト。クラスパスからコンテキスト定義ファイルを取得し、プレーンパスをパッケージパスを含むクラスパスリソース名として解釈します (例: "mypackage/myresource.txt")。classスタンドアロン XML アプリケーションコンテキスト。ファイルシステムまたは URL からコンテキスト定義ファイルを取得し、プレーンパスを相対的なファイルシステムの場所として解釈します (例: "mydir/myfile.txt")。class単一の内部DefaultListableBeanFactoryインスタンスを保持し、特定の Bean 定義フォーマットを想定しない汎用 ApplicationContext 実装。classGenericApplicationContextを継承し、GroovyObjectを実装するApplicationContext実装。AbstractApplicationContext.getBean(java.lang.String)を使用する代わりに、ドット参照解除構文で Bean を取得できます。class組み込みの XML サポートを備えた便利なアプリケーションコンテキスト。class外部構成ソースから Bean 定義を読み取るのではなく、Bean およびメッセージのプログラムによる登録をサポートするApplicationContext実装。org.springframework.test.context 内の ConfigurableApplicationContext 使用
型 ConfigurableApplicationContext のパラメーターを持つ org.springframework.test.context のメソッド修飾子と型メソッド説明voidContextCustomizer.customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) Bean 定義がコンテキストになく、コンテキストがリフレッシュされた前にロードされた後に供給ConfigurableApplicationContextをカスタマイズします。org.springframework.test.context.aot 内の ConfigurableApplicationContext 使用
型 ConfigurableApplicationContext の引数を持つ型を返す org.springframework.test.context.aot のメソッド修飾子と型メソッド説明AotTestContextInitializers.getContextInitializer(ClassSE<?> testClass) 指定されたテストクラスの AOTApplicationContextInitializerを取得します。型 ConfigurableApplicationContext の型引数を持つ org.springframework.test.context.aot のメソッドパラメーター修飾子と型メソッド説明AotContextLoader.loadContextForAotRuntime(MergedContextConfiguration mergedConfig, ApplicationContextInitializer<ConfigurableApplicationContext> initializer) 提供されたMergedContextConfigurationおよびApplicationContextInitializerに基づいて、AOT ランタイム実行用に新しいApplicationContextをロードします。org.springframework.test.context.support 内の ConfigurableApplicationContext 使用
型 ConfigurableApplicationContext のパラメーターを持つ org.springframework.test.context.support のメソッド修飾子と型メソッド説明static voidTestPropertySourceUtils.addInlinedPropertiesToEnvironment(ConfigurableApplicationContext context, StringSE... inlinedProperties) 指定されたインライン化されたプロパティを、提供されたcontextのEnvironmentに追加します。static voidTestPropertySourceUtils.addPropertiesFilesToEnvironment(ConfigurableApplicationContext context, StringSE... locations) static voidTestPropertySourceUtils.addPropertySourcesToEnvironment(ConfigurableApplicationContext context, ListSE<PropertySourceDescriptor> descriptors) protected voidAbstractContextLoader.customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) Bean 定義がコンテキストになく、文脈をリフレッシュされる前にロードされた後、このContextLoaderによって作成されたConfigurableApplicationContextをカスタマイズします。protected voidAbstractContextLoader.prepareContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) Bean 定義が読み取られる前に、このSmartContextLoaderによって作成されたConfigurableApplicationContextを準備します。型 ConfigurableApplicationContext の型引数を持つ org.springframework.test.context.support のメソッドパラメーター修飾子と型メソッド説明final ApplicationContextAbstractDelegatingSmartContextLoader.loadContextForAotRuntime(MergedContextConfiguration mergedConfig, ApplicationContextInitializer<ConfigurableApplicationContext> initializer) AOT ランタイム実行のためにApplicationContextをロードするために、適切な候補SmartContextLoaderに委譲します。AbstractGenericContextLoader.loadContextForAotRuntime(MergedContextConfiguration mergedConfig, ApplicationContextInitializer<ConfigurableApplicationContext> initializer) 提供されたMergedContextConfigurationおよびApplicationContextInitializerに基づいて、AOT ランタイム実行用にGenericApplicationContextをロードします。org.springframework.test.context.web 内の ConfigurableApplicationContext 使用
型 ConfigurableApplicationContext の型引数を持つ org.springframework.test.context.web のメソッドパラメーター修飾子と型メソッド説明AbstractGenericWebContextLoader.loadContextForAotRuntime(MergedContextConfiguration mergedConfig, ApplicationContextInitializer<ConfigurableApplicationContext> initializer) 提供されたMergedContextConfigurationおよびApplicationContextInitializerに基づいて、AOT ランタイム実行用にGenericWebApplicationContextをロードします。org.springframework.web.context 内の ConfigurableApplicationContext 使用
修飾子と型インターフェース説明interface設定可能な Web アプリケーションコンテキストによって実装されるインターフェース。型 ConfigurableApplicationContext の引数を持つ型を返す org.springframework.web.context のメソッド修飾子と型メソッド説明ContextLoader.determineContextInitializerClasses(ServletContextEE servletContext) ContextLoader.CONTEXT_INITIALIZER_CLASSES_PARAMで指定されている場合に使用するApplicationContextInitializer実装クラスを返します。org.springframework.web.context.support 内の ConfigurableApplicationContext 使用
修飾子と型クラス説明classWeb 環境用のConfigurableWebApplicationContextインターフェースを実装するAbstractRefreshableApplicationContextサブクラス。classコンポーネントクラスを入力として受け入れるWebApplicationContext実装 — 特に@Configurationクラスだけでなく、プレーンな@Componentクラス、jakarta.injectアノテーションを使用する JSR-330 準拠のクラス。classWeb 環境に適したGenericApplicationContextのサブクラス。classGroovyBeanDefinitionReaderで理解されるように、Groovy Bean 定義スクリプトおよび / または XML ファイルから構成を取得するWebApplicationContext実装。classテスト用の静的WebApplicationContext実装。classXmlBeanDefinitionReaderが理解する XML ドキュメントから構成を取得するWebApplicationContext実装。org.springframework.web.servlet 内の ConfigurableApplicationContext 使用
型 ConfigurableApplicationContext のパラメーターを持つ org.springframework.web.servlet のメソッド修飾子と型メソッド説明protected voidFrameworkServlet.applyInitializers(ConfigurableApplicationContext wac) WebApplicationContext がリフレッシュされる前に、"contextInitializerClasses" サーブレットの init-param で指定されたApplicationContextInitializerインスタンスに委譲します。
AbstractGenericContextLoader.loadContext(MergedContextConfiguration)を推奨