Difference between Batch Status and Exit Status in Spring Batch Difference between Batch Status and Exit Status in Spring Batch spring spring

Difference between Batch Status and Exit Status in Spring Batch


From the Spring Batch documentation:

A BatchStatus object that indicates the status of the execution. While running, it's BatchStatus.STARTED, if it fails, it's BatchStatus.FAILED, and if it finishes successfully, it's BatchStatus.COMPLETED

The ExitStatus indicating the result of the run. It is most important because it contains an exit code that will be returned to the caller.

For more on the difference, see the section 5.3.2.1. Batch Status vs. Exit Status. You will find the explanation is quite good.