@Component public class JobLauncherCommandLineRunner extends Object implements CommandLineRunner, ApplicationEventPublisherAware
CommandLineRunner to launch Spring Batch jobs. Runs all
jobs in the surrounding context by default. Can also be used to launch a specific job
by providing a jobName| Constructor and Description |
|---|
JobLauncherCommandLineRunner() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
launchJobFromProperties(Properties properties) |
void |
run(String... args)
Callback used to run the bean.
|
void |
setApplicationEventPublisher(ApplicationEventPublisher publisher) |
void |
setJobName(String jobName) |
public void setJobName(String jobName)
public void setApplicationEventPublisher(ApplicationEventPublisher publisher)
setApplicationEventPublisher in interface ApplicationEventPublisherAwarepublic void run(String... args) throws JobExecutionException
CommandLineRunnerrun in interface CommandLineRunnerargs - incoming main method argumentsJobExecutionExceptionprotected void launchJobFromProperties(Properties properties) throws JobExecutionException
JobExecutionExceptionCopyright © 2014. All rights reserved.