类 GenericApplicationContextFactory
- java.lang.Object
- org.springframework.batch.core.configuration.support.AbstractApplicationContextFactory
- org.springframework.batch.core.configuration.support.GenericApplicationContextFactory
- 所有已实现的接口:
ApplicationContextFactory
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class GenericApplicationContextFactory extends AbstractApplicationContextFactory
ApplicationContextFactory
implementation that takes a parent context and a path to the context to create. When createApplicationContext method is called, the childApplicationContext
will be returned. The child context is not re-created every time it is requested, it is lazily initialized and cached. Clients should ensure that it is closed when it is no longer needed.
构造器概要
构造器 构造器 说明 GenericApplicationContextFactory(java.lang.Object... resources)
Create an application context factory for the resource specified.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected org.springframework.context.ConfigurableApplicationContext
createApplicationContext(org.springframework.context.ConfigurableApplicationContext parent, java.lang.Object... resources)
从类继承的方法 org.springframework.batch.core.configuration.support.AbstractApplicationContextFactory
createApplicationContext, equals, getBeanFactoryPostProcessorClasses, hashCode, isCopyConfiguration, prepareBeanFactory, prepareContext, setApplicationContext, setBeanFactoryPostProcessorClasses, setBeanPostProcessorExcludeClasses, setCopyConfiguration, toString
构造器详细资料
GenericApplicationContextFactory
public GenericApplicationContextFactory(java.lang.Object... resources)
Create an application context factory for the resource specified. The resource can be an actualResource
, in which case it will be interpreted as an XML file, or it can be a @Configuration class, or a package name. All types must be the same (mixing XML with a java package for example is not allowed and will result in anIllegalArgumentException
).- 参数:
resources
- some resources (XML configuration files, @Configuration classes or java packages to scan)
方法详细资料
createApplicationContext
protected org.springframework.context.ConfigurableApplicationContext createApplicationContext(org.springframework.context.ConfigurableApplicationContext parent, java.lang.Object... resources)