org.springframework.context.support
Class FileSystemXmlApplicationContext
org.springframework.context.support.AbstractApplicationContext
|
+--org.springframework.context.support.AbstractXmlApplicationContext
|
+--org.springframework.context.support.FileSystemXmlApplicationContext
- Direct Known Subclasses:
- ClassPathXmlApplicationContext
- public class FileSystemXmlApplicationContext
- extends AbstractXmlApplicationContext
Standalone XML application context, taking the context definition files
from the file system or from URLs. Mainly useful for test harnesses,
but also for standalone environments.
Note: In case of multiple config locations, later bean definitions will
override ones defined in earlier loaded files. This can be leveraged to
deliberately override certain bean definitions via an extra XML file.
- Author:
- Rod Johnson, Juergen Hoeller
Methods inherited from class org.springframework.context.support.AbstractApplicationContext |
close, containsBean, containsBeanDefinition, getAliases, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanDefinitionNames, getBeansOfType, getDisplayName, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getResource, getStartupDate, isSingleton, publishEvent, refresh, setParent, toString |
FileSystemXmlApplicationContext
public FileSystemXmlApplicationContext(String configLocation)
throws org.springframework.beans.BeansException
- Create a new FileSystemXmlApplicationContext, loading the definitions
from the given XML file.
- Parameters:
- configLocation - file path
FileSystemXmlApplicationContext
public FileSystemXmlApplicationContext(String[] configLocations)
throws org.springframework.beans.BeansException
- Create a new FileSystemXmlApplicationContext, loading the definitions
from the given XML files.
- Parameters:
- configLocations - array of file paths
FileSystemXmlApplicationContext
public FileSystemXmlApplicationContext(String[] configLocations, ApplicationContext parent)
throws org.springframework.beans.BeansException
- Create a new FileSystemXmlApplicationContext with the given parent,
loading the definitions from the given XML files.
- Parameters:
- configLocations - array of file paths
- parent - the parent context
to Class java.lang.String