public abstract class AbstractRefreshableConfigApplicationContext extends AbstractRefreshableApplicationContext implements BeanNameAware, InitializingBean
AbstractRefreshableApplicationContext サブクラス。ClassPathXmlApplicationContext や FileSystemXmlApplicationContext などの XML ベースのアプリケーションコンテキスト実装、および XmlWebApplicationContext の基本クラスとして機能します。setConfigLocation(java.lang.String), setConfigLocations(java.lang.String...), getDefaultConfigLocations()DefaultResourceLoader.ClassPathContextResourceAPPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAMEAPPLICATION_STARTUP_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_NAMEFACTORY_BEAN_PREFIXCLASSPATH_ALL_URL_PREFIXCLASSPATH_URL_PREFIX| コンストラクターと説明 |
|---|
AbstractRefreshableConfigApplicationContext() 親なしで新しい AbstractRefreshableConfigApplicationContext を作成します。 |
AbstractRefreshableConfigApplicationContext(ApplicationContext parent) 指定された親コンテキストで新しい AbstractRefreshableConfigApplicationContext を作成します。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | afterPropertiesSet() 具象コンテキストのコンストラクターですでにリフレッシュされていない場合は、 AbstractApplicationContext.refresh() をトリガーします。 |
protected StringSE[] | getConfigLocations() このコンテキストの構築に使用する XML Bean 定義ファイルを参照して、リソースの場所の配列を返します。 |
protected StringSE[] | getDefaultConfigLocations() 明示的な構成場所が指定されていない場合に使用するデフォルトの構成場所を返します。 |
protected StringSE | resolvePath(StringSE path) 指定されたパスを解決し、必要に応じてプレースホルダーを対応する環境プロパティ値に置き換えます。 |
void | setBeanName(StringSE name) コンテキストインスタンス自体が Bean として定義されている場合、デフォルトでこのコンテキストの ID を Bean 名に設定します。 |
void | setConfigLocation(StringSE location) このアプリケーションコンテキストの構成場所を init-param スタイルで設定します。 |
void | setConfigLocations(StringSE... locations) このアプリケーションコンテキストの構成場所を設定します。 |
void | setId(StringSE id) このアプリケーションコンテキストの一意の ID を設定します。 |
assertBeanFactoryActive, cancelRefresh, closeBeanFactory, createBeanFactory, customizeBeanFactory, getBeanFactory, hasBeanFactory, loadBeanDefinitions, refreshBeanFactory, setAllowBeanDefinitionOverriding, setAllowCircularReferencesaddApplicationListener, addBeanFactoryPostProcessor, close, containsBean, containsBeanDefinition, containsLocalBean, createEnvironment, destroy, destroyBeans, doClose, 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, isPrototype, isRunning, isSingleton, isTypeMatch, isTypeMatch, obtainFreshBeanFactory, onClose, onRefresh, postProcessBeanFactory, prepareBeanFactory, prepareRefresh, publishEvent, publishEvent, publishEvent, refresh, registerBeanPostProcessors, registerListeners, registerShutdownHook, resetCommonCaches, setApplicationStartup, setDisplayName, setEnvironment, setParent, start, stop, toStringaddProtocolResolver, clearResourceCaches, getClassLoader, getProtocolResolvers, getResource, getResourceByPath, getResourceCache, setClassLoadercloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSEaddProtocolResolver, setClassLoadergetClassLoader, getResourcepublic AbstractRefreshableConfigApplicationContext()
public AbstractRefreshableConfigApplicationContext(@Nullable ApplicationContext parent)
parent - 親コンテキスト public void setConfigLocation(StringSE location)
設定しない場合、実装は必要に応じてデフォルトを使用できます。
public void setConfigLocations(@Nullable StringSE... locations)
設定しない場合、実装は必要に応じてデフォルトを使用できます。
@Nullable protected StringSE[] getConfigLocations()
デフォルトの実装は null を返します。サブクラスはこれをオーバーライドして、Bean 定義をロードするためのリソースロケーションのセットを提供できます。
null AbstractApplicationContext.getResources(java.lang.String), AbstractApplicationContext.getResourcePatternResolver()@Nullable protected StringSE[] getDefaultConfigLocations()
デフォルトの実装は null を返し、明示的な構成場所が必要です。
setConfigLocations(java.lang.String...)protected StringSE resolvePath(StringSE path)
path - 元のファイルパス PropertyResolver.resolveRequiredPlaceholders(String)public void setId(StringSE id)
AbstractApplicationContextデフォルトは、コンテキストインスタンスのオブジェクト ID、またはコンテキスト自体が Bean として定義されている場合はコンテキスト Bean の名前です。
ConfigurableApplicationContext の setId AbstractApplicationContext の setId id - コンテキストの一意の IDpublic void setBeanName(StringSE name)
BeanNameAware の setBeanName name - ファクトリ内の Bean の名前。この名前は、ファクトリで使用される実際の Bean 名であり、最初に指定した名前とは異なる場合があります。特に内部 Bean 名の場合、実際の Bean 名は "#..." サフィックスを追加することで一意になります。必要に応じて、BeanFactoryUtils.originalBeanName(String) メソッドを使用して、元の Bean 名(サフィックスなし)を抽出します。public void afterPropertiesSet()
AbstractApplicationContext.refresh() をトリガーします。InitializingBean の afterPropertiesSet