@MessageEndpoint public class JobConfigurationResourceLoader extends Object implements org.springframework.context.ApplicationContextAware
Resource
and create an
ApplicationContext
, registering any Job
instances defined in
a JobRegistry
. If this component is itself configured with Spring,
then its own ApplicationContext will be the parent for the new one, and the
child will inherit AOP configuration, as well as property placeholder and
custom editor configuration from the parent.Constructor and Description |
---|
JobConfigurationResourceLoader() |
Modifier and Type | Method and Description |
---|---|
protected org.springframework.batch.core.configuration.support.ApplicationContextFactory |
createApplicationContextFactory(org.springframework.context.ApplicationContext parent,
org.springframework.core.io.Resource resource)
Create an application context from the resource provided.
|
Collection<JobInfo> |
loadJobs(org.springframework.core.io.Resource resource) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setJobLoader(org.springframework.batch.core.configuration.support.JobLoader jobLoader) |
void |
setJobService(JobService jobService) |
public void setJobLoader(org.springframework.batch.core.configuration.support.JobLoader jobLoader)
public void setJobService(JobService jobService)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
@ServiceActivator public Collection<JobInfo> loadJobs(org.springframework.core.io.Resource resource) throws org.springframework.batch.core.configuration.DuplicateJobException
org.springframework.batch.core.configuration.DuplicateJobException
protected org.springframework.batch.core.configuration.support.ApplicationContextFactory createApplicationContextFactory(org.springframework.context.ApplicationContext parent, org.springframework.core.io.Resource resource)
GenericApplicationContextFactory
.parent
- the parent application context (or null if there is none)resource
- the location of the XML configurationCopyright © 2015. All rights reserved.