クラス TaskJobLauncherApplicationRunner
java.lang.ObjectSE
org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner
org.springframework.cloud.task.batch.handler.TaskJobLauncherApplicationRunner
- 実装されたすべてのインターフェース:
org.springframework.beans.factory.Aware
、org.springframework.boot.ApplicationRunner
、org.springframework.context.ApplicationEventPublisherAware
、org.springframework.core.Ordered
public class TaskJobLauncherApplicationRunner
extends org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner
ApplicationRunner
から launch
の Spring Batch ジョブ。デフォルトでは周囲のコンテキスト内のすべてのジョブを実行し、JobLauncher
の TaskExecutor
が指定されていない場合は、FAILED の BatchStatus
を返す最初のジョブで例外をスローします。JobLauncher
で TaskExecutor
が指定されている場合は、すべてのジョブが起動され、1 つ以上のジョブの BatchStatus
が FAILED である場合は例外がスローされます。TaskJobLauncherApplicationRunner は、jobName を提供することで特定のジョブを起動するためにも使用できます。TaskJobLauncherApplicationRunner は、使用中の場合は JobLauncherApplicationRunner
の代わりに使用されます。- 導入:
- 2.3.0
- 作成者:
- Glenn Renfro
フィールドサマリー
クラス org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner から継承されたフィールド
DEFAULT_ORDER
インターフェース org.springframework.core.Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターのサマリー
コンストラクター説明TaskJobLauncherApplicationRunner
(org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.explore.JobExplorer jobExplorer, org.springframework.batch.core.repository.JobRepository jobRepository, TaskBatchProperties taskBatchProperties) 新しいTaskJobLauncherApplicationRunner
を作成します。メソッドのサマリー
修飾子と型メソッド説明protected void
execute
(org.springframework.batch.core.Job job, org.springframework.batch.core.JobParameters jobParameters) void
void
setApplicationEventPublisher
(org.springframework.context.ApplicationEventPublisher publisher) クラス org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner から継承されたメソッド
getOrder, launchJobFromProperties, run, setJobName, setJobParametersConverter, setJobRegistry, setJobs, setOrder, validate
コンストラクターの詳細
TaskJobLauncherApplicationRunner
public TaskJobLauncherApplicationRunner(org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.explore.JobExplorer jobExplorer, org.springframework.batch.core.repository.JobRepository jobRepository, TaskBatchProperties taskBatchProperties) 新しいTaskJobLauncherApplicationRunner
を作成します。- パラメーター:
jobLauncher
- ジョブを始めるjobExplorer
- 以前の実行についてジョブリポジトリを確認するjobRepository
- ジョブの実行時に、指定されたパラメーターでジョブインスタンスが存在するかどうかを確認するtaskBatchProperties
- the properties used to configure the taskBatchProperties.
メソッドの詳細
setApplicationEventPublisher
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher) - 次で指定:
- インターフェース
org.springframework.context.ApplicationEventPublisherAware
のsetApplicationEventPublisher
- オーバーライド:
- クラス
org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner
のsetApplicationEventPublisher
run
- オーバーライド:
- クラス
org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner
のrun
- 例外:
org.springframework.batch.core.JobExecutionException
execute
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.boot.autoconfigure.batch.JobLauncherApplicationRunner
のexecute
- 例外:
org.springframework.batch.core.repository.JobExecutionAlreadyRunningException
org.springframework.batch.core.repository.JobRestartException
org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException
org.springframework.batch.core.JobParametersInvalidException