public class JobLauncherApplicationRunner extends ObjectSE implements ApplicationRunner, Ordered, ApplicationEventPublisherAware
ApplicationRunner
から launch
Spring Batch ジョブ。デフォルトで周囲のコンテキストですべてのジョブを実行します。jobName を指定して特定のジョブを起動するためにも使用できます 修飾子と型 | フィールドと説明 |
---|---|
static int | DEFAULT_ORDER コマンドラインランナーのデフォルトの順序。 |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターと説明 |
---|
JobLauncherApplicationRunner(org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.explore.JobExplorer jobExplorer, org.springframework.batch.core.repository.JobRepository jobRepository) 新しい JobLauncherApplicationRunner を作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
protected void | execute(org.springframework.batch.core.Job job, org.springframework.batch.core.JobParameters jobParameters) |
int | getOrder() |
protected void | launchJobFromProperties(PropertiesSE properties) |
void | run(ApplicationArguments args) Bean の実行に使用されるコールバック。 |
void | run(StringSE... args) |
void | setApplicationEventPublisher(ApplicationEventPublisher publisher) |
void | setJobNames(StringSE jobNames) |
void | setJobParametersConverter(org.springframework.batch.core.converter.JobParametersConverter converter) |
void | setJobRegistry(org.springframework.batch.core.configuration.JobRegistry jobRegistry) |
void | setJobs(CollectionSE<org.springframework.batch.core.Job> jobs) |
void | setOrder(int order) |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public static final int DEFAULT_ORDER
public JobLauncherApplicationRunner(org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.explore.JobExplorer jobExplorer, org.springframework.batch.core.repository.JobRepository jobRepository)
JobLauncherApplicationRunner
を作成します。jobLauncher
- ジョブを始める jobExplorer
- 以前の実行についてジョブリポジトリを確認する jobRepository
- ジョブの実行時に、指定されたパラメーターでジョブインスタンスが存在するかどうかを確認する public void setOrder(int order)
public void setApplicationEventPublisher(ApplicationEventPublisher publisher)
ApplicationEventPublisherAware
の setApplicationEventPublisher
@Autowired(required=false) public void setJobRegistry(org.springframework.batch.core.configuration.JobRegistry jobRegistry)
public void setJobNames(StringSE jobNames)
@Autowired(required=false) public void setJobParametersConverter(org.springframework.batch.core.converter.JobParametersConverter converter)
@Autowired(required=false) public void setJobs(CollectionSE<org.springframework.batch.core.Job> jobs)
public void run(ApplicationArguments args) throws ExceptionSE
ApplicationRunner
ApplicationRunner
の run
args
- 受信アプリケーション引数 ExceptionSE
- エラー時 public void run(StringSE... args) throws org.springframework.batch.core.JobExecutionException
org.springframework.batch.core.JobExecutionException
protected void launchJobFromProperties(PropertiesSE properties) throws org.springframework.batch.core.JobExecutionException
org.springframework.batch.core.JobExecutionException
protected void execute(org.springframework.batch.core.Job job, org.springframework.batch.core.JobParameters jobParameters) throws org.springframework.batch.core.repository.JobExecutionAlreadyRunningException, org.springframework.batch.core.repository.JobRestartException, org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException, org.springframework.batch.core.JobParametersInvalidException, org.springframework.batch.core.launch.JobParametersNotFoundException
org.springframework.batch.core.repository.JobExecutionAlreadyRunningException
org.springframework.batch.core.repository.JobRestartException
org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException
org.springframework.batch.core.JobParametersInvalidException
org.springframework.batch.core.launch.JobParametersNotFoundException