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

Fields inherited from class org.springframework.context.support.AbstractApplicationContext
MESSAGE_SOURCE_BEAN_NAME

Constructor Summary
FileSystemXmlApplicationContext(String configLocation)
          Create a new FileSystemXmlApplicationContext, loading the definitions from the given XML file.
FileSystemXmlApplicationContext(String[] configLocations)
          Create a new FileSystemXmlApplicationContext, loading the definitions from the given XML files.
FileSystemXmlApplicationContext(String[] configLocations, ApplicationContext parent)
          Create a new FileSystemXmlApplicationContext with the given parent, loading the definitions from the given XML files.

Methods inherited from class org.springframework.context.support.AbstractXmlApplicationContext
getBeanFactory

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

Constructor Detail

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

Association Links

to Class java.lang.String