spring-batch - 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]
两个线程重复相同的日志行还是同时启动两个作业?
解决方案
根据您的日志,两个不同的作业实例由两个不同的线程执行:scheduling-1
和main
.
推荐阅读
- php - JS表单提交无论是否发送邮件都不会发送成功消息
- list - 使用 for 循环在不同格式的不同列表中查找匹配项
- laravel - Laravel 8 darkaonline/l5-swagger 在创建根目录
- machine-learning - 求机器学习或深度学习的正式名称:同源不同任务和不同源相同任务
- node.js - Angular,Firebase deleteUser()不删除产品中的匿名用户,在开发项目中工作
- vhdl - 使用线性同余生成器的 VHDL 随机数
- vue.js - Vue-Authenticate for Github Login
- html - 如何围绕圆形边距旋转对象(div)?仅 CSS
- javascript - 在 macOS 上从节点项目运行 zeromq 会出错
- swift - 包含 Swift 包时如何解决冗余的协议一致性错误?