インターフェース WebApplicationContext
- すべてのスーパーインターフェース:
ApplicationContext、ApplicationEventPublisher、BeanFactory、EnvironmentCapable、HierarchicalBeanFactory、ListableBeanFactory、MessageSource、ResourceLoader、ResourcePatternResolver
- すべての既知のサブインターフェース:
ConfigurableWebApplicationContext
- すべての既知の実装クラス:
AbstractRefreshableWebApplicationContext、AnnotationConfigWebApplicationContext、GenericWebApplicationContext、GroovyWebApplicationContext、StaticWebApplicationContext、XmlWebApplicationContext
Web アプリケーションの構成を提供するインターフェース。これは、アプリケーションの実行中は読み取り専用ですが、実装がこれをサポートしている場合は再ロードできます。
このインターフェースは、getServletContext() メソッドを汎用 ApplicationContext インターフェースに追加し、ブートストラッププロセスでルートコンテキストをバインドする必要がある既知のアプリケーション属性名を定義します。
一般的なアプリケーションコンテキストと同様に、Web アプリケーションコンテキストは階層型です。アプリケーションごとに 1 つのルートコンテキストがありますが、アプリケーションの各サーブレット(MVC フレームワークのディスパッチャーサーブレットを含む)には、独自の子コンテキストがあります。
標準のアプリケーションコンテキストライフサイクル機能に加えて、WebApplicationContext 実装は ServletContextAware Bean を検出し、それに応じて setServletContext メソッドを呼び出す必要があります。
- 導入:
- 2001 年 1 月 19 日
- 作成者:
- Rod Johnson, Juergen Hoeller
- 関連事項:
フィールドのサマリー
フィールド修飾子と型フィールド説明static final StringSEファクトリ内の ServletContext 属性環境 Bean の名前。static final StringSEファクトリ内の ServletContext init-params 環境 Bean の名前。static final StringSE起動が成功したときにルート WebApplicationContext をバインドするコンテキスト属性。static final StringSEグローバル Web アプリケーションスコープのスコープ識別子: "application"。static final StringSEリクエストスコープのスコープ識別子: 「リクエスト」。static final StringSEセッションスコープのスコープ識別子: "session"。static final StringSEファクトリの ServletContext 環境 Bean の名前。インターフェース org.springframework.beans.factory.BeanFactory から継承されたフィールド
FACTORY_BEAN_PREFIX, FACTORY_BEAN_PREFIX_CHARインターフェース org.springframework.core.io.ResourceLoader から継承されたフィールド
CLASSPATH_URL_PREFIXインターフェース org.springframework.core.io.support.ResourcePatternResolver から継承されたフィールド
CLASSPATH_ALL_URL_PREFIXメソッドのサマリー
インターフェース org.springframework.context.ApplicationContext から継承されたメソッド
getApplicationName, getAutowireCapableBeanFactory, getDisplayName, getId, getParent, getStartupDateインターフェース org.springframework.context.ApplicationEventPublisher から継承されたメソッド
publishEvent, publishEventインターフェース org.springframework.beans.factory.BeanFactory から継承されたメソッド
containsBean, getAliases, getBean, getBean, getBean, getBean, getBean, getBeanProvider, getBeanProvider, getType, getType, isPrototype, isSingleton, isTypeMatch, isTypeMatchインターフェース org.springframework.core.env.EnvironmentCapable から継承されたメソッド
getEnvironmentインターフェース org.springframework.beans.factory.HierarchicalBeanFactory から継承されたメソッド
containsLocalBean, getParentBeanFactoryインターフェース org.springframework.beans.factory.ListableBeanFactory から継承されたメソッド
containsBeanDefinition, findAllAnnotationsOnBean, findAnnotationOnBean, findAnnotationOnBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanProvider, getBeanProvider, getBeansOfType, getBeansOfType, getBeansWithAnnotationインターフェース org.springframework.context.MessageSource から継承されたメソッド
getMessage, getMessage, getMessageインターフェース org.springframework.core.io.ResourceLoader から継承されたメソッド
getClassLoader, getResourceインターフェース org.springframework.core.io.support.ResourcePatternResolver から継承されたメソッド
getResources
フィールドの詳細
ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
起動が成功したときにルート WebApplicationContext をバインドするコンテキスト属性。メモ: ルートコンテキストの起動が失敗した場合、この属性には値として例外またはエラーが含まれる可能性があります。ルート WebApplicationContext を簡単に検索するには、WebApplicationContextUtils を使用します。
SCOPE_REQUEST
リクエストスコープのスコープ識別子: 「リクエスト」。標準スコープ "singleton" および "prototype" に加えてサポートされます。- 関連事項:
SCOPE_SESSION
セッションスコープのスコープ識別子: "session"。標準スコープ "singleton" および "prototype" に加えてサポートされます。- 関連事項:
SCOPE_APPLICATION
グローバル Web アプリケーションスコープのスコープ識別子: "application"。標準スコープ "singleton" および "prototype" に加えてサポートされます。- 関連事項:
SERVLET_CONTEXT_BEAN_NAME
ファクトリの ServletContext 環境 Bean の名前。- 関連事項:
CONTEXT_PARAMETERS_BEAN_NAME
ファクトリ内の ServletContext init-params 環境 Bean の名前。メモ: おそらく ServletConfig パラメーターとマージされました。ServletConfig パラメーターは、同じ名前の ServletContext パラメーターをオーバーライドします。
CONTEXT_ATTRIBUTES_BEAN_NAME
ファクトリ内の ServletContext 属性環境 Bean の名前。
メソッドの詳細
getServletContext
このアプリケーションの標準サーブレット API ServletContext を返します。