Supersedes spring-projects/spring-boot/issues/49569 (please check spring-boot team feedback on it)
With Spring Boot 4.0.3, batches using JobParameterIncrementer can’t be restarted anymore from the command line. Instead of restarting the job instance, İt starts a new instance of the job.
Without JobParameterIncrementer, there is no such issue with restart.
Spring Batch 6 doesn’t forbid to restart a job with JobParameterIncrementer. Such a job can still be restarted as expected when using JobOperator#restart (but not with JobOperator#start()).
JobOperator seems a little inconsistent to me with Spring Batch 6 major changes around JobParameterIncrementer. I don’t know if this restart issue should be fixed on Spring Boot JobLaunchApplicationRunner or on Spring Batch side.
Here is a demo.zip to illustrate the issue.
Supersedes spring-projects/spring-boot/issues/49569 (please check spring-boot team feedback on it)
With Spring Boot 4.0.3, batches using
JobParameterIncrementercan’t be restarted anymore from the command line. Instead of restarting the job instance, İt starts a new instance of the job.Without
JobParameterIncrementer, there is no such issue with restart.Spring Batch 6 doesn’t forbid to restart a job with
JobParameterIncrementer. Such a job can still be restarted as expected when usingJobOperator#restart(but not withJobOperator#start()).JobOperatorseems a little inconsistent to me with Spring Batch 6 major changes aroundJobParameterIncrementer. I don’t know if this restart issue should be fixed on Spring BootJobLaunchApplicationRunneror on Spring Batch side.Here is a demo.zip to illustrate the issue.