クラス AbstractRefreshableConfigApplicationContext
java.lang.ObjectSE
org.springframework.core.io.DefaultResourceLoader
org.springframework.context.support.AbstractApplicationContext
org.springframework.context.support.AbstractRefreshableApplicationContext
org.springframework.context.support.AbstractRefreshableConfigApplicationContext
- 実装されているすべてのインターフェース:
CloseableSE、AutoCloseableSE、Aware、BeanFactory、BeanNameAware、HierarchicalBeanFactory、InitializingBean、ListableBeanFactory、ApplicationContext、ApplicationEventPublisher、ConfigurableApplicationContext、Lifecycle、MessageSource、EnvironmentCapable、ResourceLoader、ResourcePatternResolver
public abstract class AbstractRefreshableConfigApplicationContext
extends AbstractRefreshableApplicationContext
implements BeanNameAware, InitializingBean
指定された構成場所の共通処理を追加する
AbstractRefreshableApplicationContext サブクラス。ClassPathXmlApplicationContext や FileSystemXmlApplicationContext などの XML ベースのアプリケーションコンテキスト実装、および XmlWebApplicationContext の基本クラスとして機能します。- 導入:
- 2.5.2
- 作成者:
- Juergen Hoeller
- 関連事項:
ネストされたクラスの要約
クラス org.springframework.core.io.DefaultResourceLoader から継承されたネストクラス / インターフェース
DefaultResourceLoader.ClassPathContextResourceフィールドのサマリー
クラス org.springframework.context.support.AbstractApplicationContext から継承されたフィールド
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAMEインターフェース org.springframework.beans.factory.BeanFactory から継承されたフィールド
FACTORY_BEAN_PREFIX, FACTORY_BEAN_PREFIX_CHARインターフェース org.springframework.context.ConfigurableApplicationContext から継承されたフィールド
APPLICATION_STARTUP_BEAN_NAME, BOOTSTRAP_EXECUTOR_BEAN_NAME, CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, ENVIRONMENT_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SHUTDOWN_HOOK_THREAD_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAMEインターフェース org.springframework.core.io.ResourceLoader から継承されたフィールド
CLASSPATH_URL_PREFIXインターフェース org.springframework.core.io.support.ResourcePatternResolver から継承されたフィールド
CLASSPATH_ALL_URL_PREFIXコンストラクターの概要
コンストラクターコンストラクター説明親なしで新しい AbstractRefreshableConfigApplicationContext を作成します。指定された親コンテキストで新しい AbstractRefreshableConfigApplicationContext を作成します。メソッドのサマリー
修飾子と型メソッド説明void具象コンテキストのコンストラクターですでにリフレッシュされていない場合は、AbstractApplicationContext.refresh()をトリガーします。protected StringSE[]このコンテキストの構築に使用する XML Bean 定義ファイルを参照して、リソースの場所の配列を返します。protected StringSE[]明示的な構成場所が指定されていない場合に使用するデフォルトの構成場所を返します。protected StringSEresolvePath(StringSE path) 指定されたパスを解決し、必要に応じてプレースホルダーを対応する環境プロパティ値に置き換えます。voidsetBeanName(StringSE name) コンテキストインスタンス自体が Bean として定義されている場合、デフォルトでこのコンテキストの ID を Bean 名に設定します。voidsetConfigLocation(StringSE location) このアプリケーションコンテキストの構成場所を init-param スタイルで設定します。voidsetConfigLocations(StringSE... locations) このアプリケーションコンテキストの構成場所を設定します。voidこのアプリケーションコンテキストの一意の ID を設定します。クラス org.springframework.context.support.AbstractRefreshableApplicationContext から継承されたメソッド
assertBeanFactoryActive, cancelRefresh, closeBeanFactory, createBeanFactory, customizeBeanFactory, getBeanFactory, hasBeanFactory, loadBeanDefinitions, refreshBeanFactory, setAllowBeanDefinitionOverriding, setAllowCircularReferencesクラス org.springframework.context.support.AbstractApplicationContext から継承されたメソッド
addApplicationListener, addBeanFactoryPostProcessor, clearResourceCaches, close, containsBean, containsBeanDefinition, containsLocalBean, createEnvironment, destroyBeans, doClose, findAllAnnotationsOnBean, findAnnotationOnBean, findAnnotationOnBean, finishBeanFactoryInitialization, finishRefresh, getAliases, getApplicationListeners, getApplicationName, getApplicationStartup, getAutowireCapableBeanFactory, getBean, getBean, getBean, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanProvider, getBeanProvider, getBeanProvider, getBeanProvider, getBeansOfType, getBeansOfType, getBeansWithAnnotation, getDisplayName, getEnvironment, getId, getInternalParentBeanFactory, getInternalParentMessageSource, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getResourcePatternResolver, getResources, getStartupDate, getType, getType, initApplicationEventMulticaster, initLifecycleProcessor, initMessageSource, initPropertySources, invokeBeanFactoryPostProcessors, isActive, isClosed, isPrototype, isRunning, isSingleton, isTypeMatch, isTypeMatch, obtainFreshBeanFactory, onClose, onRefresh, postProcessBeanFactory, prepareBeanFactory, prepareRefresh, publishEvent, publishEvent, publishEvent, refresh, registerBeanPostProcessors, registerListeners, registerShutdownHook, removeApplicationListener, resetCommonCaches, setApplicationStartup, setDisplayName, setEnvironment, setParent, start, stop, toStringクラス org.springframework.core.io.DefaultResourceLoader から継承されたメソッド
addProtocolResolver, getClassLoader, getProtocolResolvers, getResource, getResourceByPath, getResourceCache, setClassLoaderクラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSEインターフェース org.springframework.context.ConfigurableApplicationContext から継承されたメソッド
addProtocolResolver, setClassLoaderインターフェース org.springframework.core.io.ResourceLoader から継承されたメソッド
getClassLoader, getResource
コンストラクターの詳細
AbstractRefreshableConfigApplicationContext
public AbstractRefreshableConfigApplicationContext()親なしで新しい AbstractRefreshableConfigApplicationContext を作成します。AbstractRefreshableConfigApplicationContext
指定された親コンテキストで新しい AbstractRefreshableConfigApplicationContext を作成します。- パラメーター:
parent- 親コンテキスト
メソッドの詳細
setConfigLocation
このアプリケーションコンテキストの構成場所を init-param スタイルで設定します。つまり、コンマ、セミコロン、空白で区切られた個別の場所を使用します。設定しない場合、実装は必要に応じてデフォルトを使用できます。
setConfigLocations
このアプリケーションコンテキストの構成場所を設定します。設定しない場合、実装は必要に応じてデフォルトを使用できます。
getConfigLocations
このコンテキストの構築に使用する XML Bean 定義ファイルを参照して、リソースの場所の配列を返します。ResourcePatternResolver を介して解決されるロケーションパターンを含めることもできます。デフォルトの実装は
nullを返します。サブクラスはこれをオーバーライドして、Bean 定義をロードするためのリソースロケーションのセットを提供できます。- 戻り値:
- リソースの場所の配列、ない場合は
null - 関連事項:
getDefaultConfigLocations
明示的な構成場所が指定されていない場合に使用するデフォルトの構成場所を返します。デフォルトの実装は
nullを返し、明示的な構成場所が必要です。- 戻り値:
- デフォルトの設定場所の配列(ある場合)
- 関連事項:
resolvePath
指定されたパスを解決し、必要に応じてプレースホルダーを対応する環境プロパティ値に置き換えます。構成場所に適用されます。- パラメーター:
path- 元のファイルパス- 戻り値:
- 解決されたファイルパス
- 関連事項:
setId
クラスからコピーされた説明:AbstractApplicationContextこのアプリケーションコンテキストの一意の ID を設定します。デフォルトは、コンテキストインスタンスのオブジェクト ID、またはコンテキスト自体が Bean として定義されている場合はコンテキスト Bean の名前です。
- 次で指定:
- インターフェース
ConfigurableApplicationContextのsetId - オーバーライド:
- クラス
AbstractApplicationContextのsetId - パラメーター:
id- コンテキストの一意の ID
setBeanName
コンテキストインスタンス自体が Bean として定義されている場合、デフォルトでこのコンテキストの ID を Bean 名に設定します。- 次で指定:
- インターフェース
BeanNameAwareのsetBeanName - パラメーター:
name- ファクトリ内の Bean の名前。この名前は、ファクトリで使用される実際の Bean 名であり、最初に指定した名前とは異なる場合があります。特に内部 Bean 名の場合、実際の Bean 名は "#..." サフィックスを追加することで一意になります。必要に応じて、BeanFactoryUtils.originalBeanName(String)メソッドを使用して、元の Bean 名(サフィックスなし)を抽出します。
afterPropertiesSet
public void afterPropertiesSet()具象コンテキストのコンストラクターですでにリフレッシュされていない場合は、AbstractApplicationContext.refresh()をトリガーします。- 次で指定:
- インターフェース
InitializingBeanのafterPropertiesSet