From the course: Spring: Spring Batch

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Job parameters

Job parameters

From the course: Spring: Spring Batch

Start my 1-month free trial

Job parameters

- [Instructor] Job instances are created using the name of the job and parameters passed by a job launcher. If a job instance has been successfully executed, it's not possible to rerun that same job instance. Instead, a new job instance must be created by passing a new job parameter to the job. So for example, when we've been running our job, we haven't been supplying any job parameters. Therefore, if we re-execute the same job, it will not be started by the framework, it will assume the job has been successfully completed, and it won't allow us to restart. So here you can see that it's signifying the step has already been completed, or it's not restartable. So if we want to relaunch this job, we need to do it with a new job parameter so that we get a new job instance. To help us with that, I'm going to package our job as a jar using Maven. So just right click on the project go to Run as and then Maven build. From here…

Contents