public class ClasspathXmlApplicationContextsFactoryBean extends java.lang.Object implements org.springframework.beans.factory.FactoryBean<ApplicationContextFactory[]>, org.springframework.context.ApplicationContextAware
ApplicationContextFactory
components from a set of resources.| Constructor and Description |
|---|
ClasspathXmlApplicationContextsFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
ApplicationContextFactory[] |
getObject()
Create an
ApplicationContextFactory from each resource provided
in setResources(Resource[]). |
java.lang.Class<?> |
getObjectType()
The type of object returned by this factory - an array of
ApplicationContextFactory. |
boolean |
isSingleton()
Optimization hint for bean factory.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
An application context that can be used as a parent context for all the
factories.
|
void |
setBeanFactoryPostProcessorClasses(java.lang.Class<? extends org.springframework.beans.factory.config.BeanFactoryPostProcessor>[] beanFactoryPostProcessorClasses)
Determines which bean factory post processors (like property
placeholders) should be copied from the parent context.
|
void |
setBeanPostProcessorExcludeClasses(java.lang.Class<?>[] beanPostProcessorExcludeClasses)
Determines by exclusion which bean post processors should be copied from
the parent context.
|
void |
setCopyConfiguration(boolean copyConfiguration)
Flag to indicate that configuration such as bean post processors and
custom editors should be copied from the parent context.
|
void |
setResources(org.springframework.core.io.Resource[] resources)
A set of resources to load using a
GenericApplicationContextFactory. |
public ClasspathXmlApplicationContextsFactoryBean()
public void setResources(org.springframework.core.io.Resource[] resources)
GenericApplicationContextFactory. Each resource should be a
Spring configuration file which is loaded into an application context
whose parent is the current context. In a configuration file the
resources can be given as a pattern (e.g.
classpath*:/config/*-context.xml).resources - public void setCopyConfiguration(boolean copyConfiguration)
copyConfiguration - the flag value to setpublic void setBeanFactoryPostProcessorClasses(java.lang.Class<? extends org.springframework.beans.factory.config.BeanFactoryPostProcessor>[] beanFactoryPostProcessorClasses)
PropertyPlaceholderConfigurer and CustomEditorConfigurer.beanFactoryPostProcessorClasses - post processor types to be copiedpublic void setBeanPostProcessorExcludeClasses(java.lang.Class<?>[] beanPostProcessorExcludeClasses)
BeanFactoryAware (so any post
processors that have a reference to the parent bean factory are not
copied into the child). Note that these classes do not themselves have to
be BeanPostProcessor implementations or sub-interfaces.beanPostProcessorExcludeClasses - the classes to setpublic ApplicationContextFactory[] getObject() throws java.lang.Exception
ApplicationContextFactory from each resource provided
in setResources(Resource[]).getObject in interface org.springframework.beans.factory.FactoryBean<ApplicationContextFactory[]>ApplicationContextFactoryjava.lang.ExceptionFactoryBean.getObject()public java.lang.Class<?> getObjectType()
ApplicationContextFactory.getObjectType in interface org.springframework.beans.factory.FactoryBean<ApplicationContextFactory[]>ApplicationContextFactoryFactoryBean.getObjectType()public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<ApplicationContextFactory[]>FactoryBean.isSingleton()public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext in interface org.springframework.context.ApplicationContextAwareapplicationContext - the ApplicationContext to setorg.springframework.beans.BeansExceptionApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)