类 AbstractRefreshableConfigApplicationContext
java.lang.Object
cn.taketoday.core.io.DefaultResourceLoader
cn.taketoday.context.support.AbstractApplicationContext
cn.taketoday.context.support.AbstractRefreshableApplicationContext
cn.taketoday.context.support.AbstractRefreshableConfigApplicationContext
- 所有已实现的接口:
Aware,BeanFactory,BeanNameAware,HierarchicalBeanFactory,InitializingBean,BeanDefinitionRegistry,DependencyInjectorProvider,ApplicationContext,ApplicationEventPublisher,ConfigurableApplicationContext,Lifecycle,MessageSource,cn.taketoday.core.AliasRegistry,cn.taketoday.core.env.EnvironmentCapable,cn.taketoday.core.io.PatternResourceLoader,cn.taketoday.core.io.ResourceLoader,Closeable,AutoCloseable
- 直接已知子类:
AbstractXmlApplicationContext
public abstract class AbstractRefreshableConfigApplicationContext
extends AbstractRefreshableApplicationContext
implements BeanNameAware, InitializingBean
AbstractRefreshableApplicationContext subclass that adds common handling
of specified config locations.- 从以下版本开始:
- 4.0 2022/2/20 17:39
- 作者:
- Juergen Hoeller, Harry Yang
- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 cn.taketoday.core.io.DefaultResourceLoader
cn.taketoday.core.io.DefaultResourceLoader.ClassPathContextResource从接口继承的嵌套类/接口 cn.taketoday.context.ApplicationContext
ApplicationContext.State -
字段概要
从类继承的字段 cn.taketoday.context.support.AbstractApplicationContext
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, log, MESSAGE_SOURCE_BEAN_NAME从接口继承的字段 cn.taketoday.context.ApplicationContext
APPLICATION_NAME从接口继承的字段 cn.taketoday.beans.factory.BeanFactory
FACTORY_BEAN_PREFIX从接口继承的字段 cn.taketoday.context.ConfigurableApplicationContext
CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SHUTDOWN_HOOK_THREAD_NAME从接口继承的字段 cn.taketoday.core.io.PatternResourceLoader
CLASSPATH_ALL_URL_PREFIX从接口继承的字段 cn.taketoday.core.io.ResourceLoader
CLASSPATH_URL_PREFIX -
构造器概要
构造器构造器说明Create a new AbstractRefreshableConfigApplicationContext with no parent.Create a new AbstractRefreshableConfigApplicationContext with the given parent context. -
方法概要
修饰符和类型方法说明voidTriggersAbstractApplicationContext.refresh()if not refreshed in the concrete context's constructor already.protected String[]Return an array of resource locations, referring to the XML bean definition files that this context should be built with.protected String[]Return the default config locations to use, for the case where no explicit config locations have been specified.protected StringresolvePath(String path) Resolve the given path, replacing placeholders with corresponding environment property values if necessary.voidsetBeanName(String name) Sets the id of this context to the bean name by default, for cases where the context instance is itself defined as a bean.voidsetConfigLocation(String location) Set the config locations for this application context in init-param style, i.e. with distinct locations separated by commas, semicolons or whitespace.voidsetConfigLocations(String... locations) Set the config locations for this application context.voidSet the unique id of this application context.从类继承的方法 cn.taketoday.context.support.AbstractRefreshableApplicationContext
assertBeanFactoryActive, cancelRefresh, closeBeanFactory, containsBeanDefinition, containsBeanDefinition, containsBeanDefinition, containsBeanDefinition, createBeanFactory, createBootstrapContext, customizeBeanFactory, getAliasList, getBeanDefinition, getBeanDefinition, getBeanDefinitionCount, getBeanDefinitionNames, getBeanDefinitions, getBeanFactory, hasBeanFactory, isAlias, isAllowBeanDefinitionOverriding, isBeanNameInUse, loadBeanDefinitions, refreshBeanFactory, registerAlias, registerBeanDefinition, removeAlias, removeBeanDefinition, setAllowBeanDefinitionOverriding, setAllowCircularReferences从类继承的方法 cn.taketoday.context.support.AbstractApplicationContext
addApplicationListener, addBeanFactoryPostProcessor, addFactoryPostProcessors, applyState, close, containsBean, containsLocalBean, createEnvironment, destroyBeans, doClose, findAnnotationOnBean, findAnnotationOnBean, findSynthesizedAnnotation, finishBeanFactoryInitialization, finishRefresh, formatStartupDate, getAliases, getAnnotatedBeans, getApplicationEventMulticaster, getApplicationListeners, getApplicationName, getAutowireCapableBeanFactory, getBean, getBean, getBean, getBean, getBean, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeans, getBeansOfType, getBeansOfType, getBeansOfType, getBeansWithAnnotation, getBeansWithAnnotation, getBootstrapContext, getDisplayName, getEnvironment, getExpressionEvaluator, getFactoryPostProcessors, getId, getInjector, getInternalParentBeanFactory, getInternalParentMessageSource, getLifecycleProcessor, getMessage, getMessage, getMessage, getObjectSupplier, getObjectSupplier, getObjectSupplier, getObjectSupplier, getParent, getParentBeanFactory, getPatternResourceLoader, getResources, getStartupDate, getState, getType, getType, hasStarted, initApplicationEventMulticaster, initLifecycleProcessor, initMessageSource, initPropertySources, invokeBeanFactoryPostProcessors, isActive, isPrototype, isRunning, isSingleton, isTypeMatch, isTypeMatch, obtainBootstrapContext, obtainFreshBeanFactory, onClose, onRefresh, postProcessBeanFactory, prepareBeanFactory, prepareRefresh, publishEvent, publishEvent, refresh, registerApplicationListeners, registerBeanPostProcessors, registerFrameworkComponents, registerShutdownHook, removeApplicationListener, resetCommonCaches, scan, setBootstrapContext, setDisplayName, setEnvironment, setLifecycleProcessor, setParent, start, stop, toString, unwrapFactory从类继承的方法 cn.taketoday.core.io.DefaultResourceLoader
addProtocolResolver, clearResourceCaches, getClassLoader, getProtocolResolvers, getResource, getResourceByPath, getResourceCache, setClassLoader从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 cn.taketoday.core.AliasRegistry
getAliases从接口继承的方法 cn.taketoday.beans.factory.BeanFactory
getBeanNamesForType, unwrap从接口继承的方法 cn.taketoday.context.ConfigurableApplicationContext
addProtocolResolver, setClassLoader从接口继承的方法 cn.taketoday.core.io.PatternResourceLoader
getResourcesArray从接口继承的方法 cn.taketoday.core.io.ResourceLoader
getClassLoader, getResource
-
构造器详细资料
-
AbstractRefreshableConfigApplicationContext
public AbstractRefreshableConfigApplicationContext()Create a new AbstractRefreshableConfigApplicationContext with no parent. -
AbstractRefreshableConfigApplicationContext
Create a new AbstractRefreshableConfigApplicationContext with the given parent context.- 参数:
parent- the parent context
-
-
方法详细资料
-
setConfigLocation
Set the config locations for this application context in init-param style, i.e. with distinct locations separated by commas, semicolons or whitespace.If not set, the implementation may use a default as appropriate.
-
setConfigLocations
Set the config locations for this application context.If not set, the implementation may use a default as appropriate.
-
getConfigLocations
Return an array of resource locations, referring to the XML bean definition files that this context should be built with. Can also include location patterns, which will get resolved via a ResourcePatternResolver.The default implementation returns
null. Subclasses can override this to provide a set of resource locations to load bean definitions from.- 返回:
- an array of resource locations, or
nullif none - 另请参阅:
-
getDefaultConfigLocations
Return the default config locations to use, for the case where no explicit config locations have been specified.The default implementation returns
null, requiring explicit config locations.- 返回:
- an array of default config locations, if any
- 另请参阅:
-
resolvePath
Resolve the given path, replacing placeholders with corresponding environment property values if necessary. Applied to config locations.- 参数:
path- the original file path- 返回:
- the resolved file path
- 另请参阅:
-
PropertyResolver.resolveRequiredPlaceholders(String)
-
setId
从类复制的说明:AbstractApplicationContextSet the unique id of this application context.Default is the object id of the context instance, or the name of the context bean if the context is itself defined as a bean.
- 指定者:
setId在接口中ConfigurableApplicationContext- 覆盖:
setId在类中AbstractApplicationContext- 参数:
id- the unique id of the context
-
setBeanName
Sets the id of this context to the bean name by default, for cases where the context instance is itself defined as a bean.- 指定者:
setBeanName在接口中BeanNameAware
-
afterPropertiesSet
public void afterPropertiesSet()TriggersAbstractApplicationContext.refresh()if not refreshed in the concrete context's constructor already.- 指定者:
afterPropertiesSet在接口中InitializingBean
-