Class AbstractXmlApplicationContext

All Implemented Interfaces:
Closeable, AutoCloseable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactory, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.HierarchicalBeanFactory, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.ListableBeanFactory, ApplicationContext, ApplicationEventPublisher, ConfigurableApplicationContext, Lifecycle, MessageSource, org.springframework.core.env.EnvironmentCapable, org.springframework.core.io.ResourceLoader, org.springframework.core.io.support.ResourcePatternResolver
Direct Known Subclasses:
ClassPathXmlApplicationContext, FileSystemXmlApplicationContext

public abstract class AbstractXmlApplicationContext extends AbstractRefreshableConfigApplicationContext
Convenient base class for ApplicationContext implementations, drawing configuration from XML documents containing bean definitions understood by an XmlBeanDefinitionReader.

Subclasses just have to implement the getConfigResources() and/or the AbstractRefreshableConfigApplicationContext.getConfigLocations() method. Furthermore, they might override the DefaultResourceLoader.getResourceByPath(java.lang.String) hook to interpret relative paths in an environment-specific fashion, and/or AbstractApplicationContext.getResourcePatternResolver() for extended pattern resolution.

Author:
Rod Johnson, Juergen Hoeller
See Also:
  • Constructor Details

    • AbstractXmlApplicationContext

      public AbstractXmlApplicationContext()
      Create a new AbstractXmlApplicationContext with no parent.
    • AbstractXmlApplicationContext

      public AbstractXmlApplicationContext(@Nullable ApplicationContext parent)
      Create a new AbstractXmlApplicationContext with the given parent context.
      Parameters:
      parent - the parent context
  • Method Details