首页 > 解决方案 > Spring Batch 一次启动多个作业?

问题描述

在我的春季批次中,我看到以下日志。

INFO 5572 --- [   scheduling-1] o.s.b.c.l.support.SimpleJobLauncher      : Job: [FlowJob: [name=sample]] launched with the following parameters: [{JobID=x}]
INFO 5572 --- [           main] o.s.b.c.l.support.SimpleJobLauncher      : Job: [FlowJob: [name=sample]] launched with the following parameters: [{run.id=1, JobID=y}]
INFO 5572 --- [   scheduling-1] o.s.batch.core.job.SimpleStepHandler     : Executing step: [step1]
INFO 5572 --- [           main] o.s.batch.core.job.SimpleStepHandler     : Executing step: [step1]

两个线程重复相同的日志行还是同时启动两个作业?

标签: spring-batch

解决方案


根据您的日志,两个不同的作业实例由两个不同的线程执行:scheduling-1main.


推荐阅读