AbstractRefreshableApplicationContext subclass that adds common handling
of specified config locations. Serves as base class for XML-based application
context implementations such as ClassPathXmlApplicationContext and
FileSystemXmlApplicationContext, as well as
org.springframework.web.context.support.XmlWebApplicationContext .
setConfigLocation, setConfigLocations, getDefaultConfigLocations
| Modifier and Type | Field and Description |
|---|---|
| private String[] | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | AbstractRefreshableConfigApplicationContext()
Create a new AbstractRefreshableConfigApplicationContext with no parent. |
| public | AbstractRefreshableConfigApplicationContext(ApplicationContext
the parent context parent)Create a new AbstractRefreshableConfigApplicationContext with the given parent context. |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. Triggers |
| protected String[] | Returns: an array of resource locations, ornull if noneReturn an array of resource locations, referring to the XML bean definition files that this context should be built with. |
| protected String[] | Returns: an array of default config locations, if anyReturn the default config locations to use, for the case where no explicit config locations have been specified. |
| protected String | Returns: the resolved file paththe original file path path)Resolve the given path, replacing placeholders with corresponding environment property values if necessary. |
| public void | setBeanName(String
the name of the bean in the factory.
Note that this name is the actual bean name used in the factory, which may
differ from the originally specified name: in particular for inner bean
names, the actual bean name might have been made unique through appending
"#..." suffixes. Use the name)BeanFactoryUtils#originalBeanName(String)
method to extract the original bean name (without suffix), if desired.Implements org. Sets the id of this context to the bean name by default, for cases where the context instance is itself defined as a bean. |
| public void | setConfigLocation(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. |
| public void | |
| public void | setId(String
the unique id of the context id)Overrides org. Implements org. Set the unique id of this application context. |
| configLocations | back to summary |
|---|---|
| private String[] configLocations
| |
| setIdCalled | back to summary |
|---|---|
| private boolean setIdCalled | |
| AbstractRefreshableConfigApplicationContext | back to summary |
|---|---|
| public AbstractRefreshableConfigApplicationContext() Create a new AbstractRefreshableConfigApplicationContext with no parent. | |
| AbstractRefreshableConfigApplicationContext | back to summary |
|---|---|
| public AbstractRefreshableConfigApplicationContext(ApplicationContext parent) Create a new AbstractRefreshableConfigApplicationContext with the given parent context.
| |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. Triggers
| |
| getConfigLocations | back to summary |
|---|---|
| protected String[] 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
| |
| getDefaultConfigLocations | back to summary |
|---|---|
| protected String[] getDefaultConfigLocations() Return the default config locations to use, for the case where no explicit config locations have been specified. The default implementation returns
| |
| resolvePath | back to summary |
|---|---|
| protected String resolvePath(String path) Resolve the given path, replacing placeholders with corresponding environment property values if necessary. Applied to config locations.
| |
| setBeanName | back to summary |
|---|---|
| public void setBeanName(String name) Implements org. Sets the id of this context to the bean name by default, for cases where the context instance is itself defined as a bean.
| |
| setConfigLocation | back to summary |
|---|---|
| public void setConfigLocation(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. If not set, the implementation may use a default as appropriate. | |
| setConfigLocations | back to summary |
|---|---|
| public void setConfigLocations(String... locations) Set the config locations for this application context. If not set, the implementation may use a default as appropriate. | |
| setId | back to summary |
|---|---|
| public void setId(String id) Overrides org. Implements org. Doc from org. Set 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. | |