public class JobLauncherCommandLineRunner extends ObjectSE implements CommandLineRunner, Ordered, ApplicationEventPublisherAware
CommandLineRunner
から launch
Spring Batch ジョブ。デフォルトでは周囲のコンテキスト内のすべてのジョブを実行します。jobName を指定して特定のジョブを起動することもできます 修飾子と型 | フィールドと説明 |
---|---|
static int | DEFAULT_ORDER コマンドラインランナーのデフォルトの順序。 |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターと説明 |
---|
JobLauncherCommandLineRunner(org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.explore.JobExplorer jobExplorer) 使用すべきではありません。 JobLauncherCommandLineRunner(JobLauncher, JobExplorer, JobRepository) を推奨する 2.0.7 以降。ジョブの実行時に、指定されたパラメーターを持つジョブインスタンスが存在するかどうかを確認するには、ジョブリポジトリが必要です(ジョブエクスプローラーでは不可能です)。 |
JobLauncherCommandLineRunner(org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.explore.JobExplorer jobExplorer, org.springframework.batch.core.repository.JobRepository jobRepository) 新しい JobLauncherCommandLineRunner を作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
protected void | execute(org.springframework.batch.core.Job job, org.springframework.batch.core.JobParameters jobParameters) |
int | getOrder() |
protected void | launchJobFromProperties(PropertiesSE properties) |
void | run(StringSE... args) Bean の実行に使用されるコールバック。 |
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
@DeprecatedSE public JobLauncherCommandLineRunner(org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.explore.JobExplorer jobExplorer)
JobLauncherCommandLineRunner(JobLauncher, JobExplorer, JobRepository)
が推奨されます。ジョブを実行するときに、指定されたパラメーターでジョブインスタンスが存在するかどうかを確認するには、ジョブリポジトリが必要です (ジョブエクスプローラーでは不可能です)。JobLauncherCommandLineRunner
を作成します。jobLauncher
- ジョブを始める jobExplorer
- 以前の実行についてジョブリポジトリを確認する public JobLauncherCommandLineRunner(org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.explore.JobExplorer jobExplorer, org.springframework.batch.core.repository.JobRepository jobRepository)
JobLauncherCommandLineRunner
を作成します。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(StringSE... args) throws org.springframework.batch.core.JobExecutionException
CommandLineRunner
CommandLineRunner
の run
args
- 受信メインメソッド引数 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
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.