类 ClasspathXmlApplicationContextsFactoryBean
- java.lang.Object
- org.springframework.batch.core.configuration.support.ClasspathXmlApplicationContextsFactoryBean
- 所有已实现的接口:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.FactoryBean<ApplicationContextFactory[]>
,org.springframework.context.ApplicationContextAware
public class ClasspathXmlApplicationContextsFactoryBean extends java.lang.Object implements org.springframework.beans.factory.FactoryBean<ApplicationContextFactory[]>, org.springframework.context.ApplicationContextAware
A convenient factory for creating a set ofApplicationContextFactory
components from a set ofresources
.- 作者:
- Dave Syer
构造器概要
构造器 构造器 说明 ClasspathXmlApplicationContextsFactoryBean()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ApplicationContextFactory[]
getObject()
Create anApplicationContextFactory
from each resource provided insetResources(Resource[])
.java.lang.Class<?>
getObjectType()
The type of object returned by this factory - an array ofApplicationContextFactory
.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 aGenericApplicationContextFactory
.
构造器详细资料
ClasspathXmlApplicationContextsFactoryBean
public ClasspathXmlApplicationContextsFactoryBean()
方法详细资料
setResources
public void setResources(org.springframework.core.io.Resource[] resources)
A set of resources to load using aGenericApplicationContextFactory
. 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
- array of resources to use
setCopyConfiguration
public void setCopyConfiguration(boolean copyConfiguration)
Flag to indicate that configuration such as bean post processors and custom editors should be copied from the parent context. Defaults to true.- 参数:
copyConfiguration
- the flag value to set
setBeanFactoryPostProcessorClasses
public 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. Defaults toPropertyPlaceholderConfigurer
andCustomEditorConfigurer
.- 参数:
beanFactoryPostProcessorClasses
- post processor types to be copied
setBeanPostProcessorExcludeClasses
public void setBeanPostProcessorExcludeClasses(java.lang.Class<?>[] beanPostProcessorExcludeClasses)
Determines by exclusion which bean post processors should be copied from the parent context. Defaults toBeanFactoryAware
(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 beBeanPostProcessor
implementations or sub-interfaces.- 参数:
beanPostProcessorExcludeClasses
- the classes to set
getObject
public ApplicationContextFactory[] getObject() throws java.lang.Exception
Create anApplicationContextFactory
from each resource provided insetResources(Resource[])
.- 指定者:
getObject
在接口中org.springframework.beans.factory.FactoryBean<ApplicationContextFactory[]>
- 返回:
- an array of
ApplicationContextFactory
- 抛出:
java.lang.Exception
- 另请参阅:
FactoryBean.getObject()
getObjectType
public java.lang.Class<?> getObjectType()
The type of object returned by this factory - an array ofApplicationContextFactory
.- 指定者:
getObjectType
在接口中org.springframework.beans.factory.FactoryBean<ApplicationContextFactory[]>
- 返回:
- array of
ApplicationContextFactory
- 另请参阅:
FactoryBean.getObjectType()
isSingleton
public boolean isSingleton()
Optimization hint for bean factory.- 指定者:
isSingleton
在接口中org.springframework.beans.factory.FactoryBean<ApplicationContextFactory[]>
- 返回:
- true
- 另请参阅:
FactoryBean.isSingleton()
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
An application context that can be used as a parent context for all the factories.- 指定者:
setApplicationContext
在接口中org.springframework.context.ApplicationContextAware
- 参数:
applicationContext
- theApplicationContext
to set- 另请参阅:
ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)