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
- [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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Spring Batch architecture5m 28s
-
Configuring a job repository6m 13s
-
Job parameters6m 59s
-
Building jobs with multiple steps5m 26s
-
Restarting jobs5m 19s
-
Job flow5m 11s
-
Building conditional flows6m 48s
-
Controlling flow with custom statuses6m 59s
-
Challenge: Creating a conditional flow1m 20s
-
Solution: Creating a conditional flow6m 35s
-
-
-
-
-
-
-
-