クラス JobLauncherApplicationRunner
java.lang.ObjectSE
org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner
- 実装されたすべてのインターフェース:
Aware
、InitializingBean
、ApplicationRunner
、ApplicationEventPublisherAware
、Ordered
public class JobLauncherApplicationRunner
extends ObjectSE
implements ApplicationRunner, InitializingBean, Ordered, ApplicationEventPublisherAware
ApplicationRunner
から launch
、Spring Batch のジョブ。コンテキスト内に 1 つのジョブが見つかった場合、デフォルトでそのジョブが実行されます。複数のジョブが見つかった場合は、jobName を指定して特定のジョブを起動します。- 導入:
- 2.3.0
- 作成者:
- Dave Syer, Jean-Pierre Bergamin, Mahmoud Ben Hassine, Stephane Nicoll, Akshay Dubey
フィールドのサマリー
フィールドインターフェース org.springframework.core.Ordered から継承されたフィールド
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
を作成します。メソッドのサマリー
修飾子と型メソッド説明void
protected void
execute
(org.springframework.batch.core.Job job, org.springframework.batch.core.JobParameters jobParameters) int
getOrder()
protected void
launchJobFromProperties
(PropertiesSE properties) void
void
run
(ApplicationArguments args) Bean の実行に使用されるコールバック。void
void
setJobName
(StringSE jobName) 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) void
validate()
非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。
フィールドの詳細
DEFAULT_ORDER
public static final int DEFAULT_ORDERコマンドラインランナーのデフォルトの順序。- 関連事項:
コンストラクターの詳細
JobLauncherApplicationRunner
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
- ジョブの実行時に、指定されたパラメーターでジョブインスタンスが存在するかどうかを確認する
メソッドの詳細
afterPropertiesSet
public void afterPropertiesSet()- 次で指定:
- インターフェース
InitializingBean
のafterPropertiesSet
validate
非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。setOrder
public void setOrder(int order) getOrder
public int getOrder()setApplicationEventPublisher
- 次で指定:
- インターフェース
ApplicationEventPublisherAware
のsetApplicationEventPublisher
setJobRegistry
@Autowired(required=false) public void setJobRegistry(org.springframework.batch.core.configuration.JobRegistry jobRegistry) setJobName
setJobParametersConverter
@Autowired(required=false) public void setJobParametersConverter(org.springframework.batch.core.converter.JobParametersConverter converter) setJobs
@Autowired(required=false) public void setJobs(CollectionSE<org.springframework.batch.core.Job> jobs) run
インターフェースからコピーされた説明:ApplicationRunner
Bean の実行に使用されるコールバック。- 次で指定:
- インターフェース
ApplicationRunner
のrun
- パラメーター:
args
- 受信アプリケーション引数- 例外:
ExceptionSE
- エラー時
run
- 例外:
org.springframework.batch.core.JobExecutionException
launchJobFromProperties
protected void launchJobFromProperties(PropertiesSE properties) throws org.springframework.batch.core.JobExecutionException - 例外:
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.batch.core.repository.JobExecutionAlreadyRunningException
org.springframework.batch.core.repository.JobRestartException
org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException
org.springframework.batch.core.JobParametersInvalidException