title: Spring batch job exit status for failed step
body: <p>I recently upgraded an old application using <code>Spring Batch 2.2.0 to 3.0.5</code>. I made the necessary changes to the DB tables and some minute code changes related to parameter APIs.</p>
  
  <p>Now when I run the application it is working but if a step's exit status is FAILED the job's exist status is set to COMPLETED. This is causing issues as our application code treats this as a successful execution. I am getting around it by adding a code snippet in <code>afterJob()</code> where I check the <code>stepExecution</code> list and set the job exit status manually, but shouldn't the Spring Batch framework take care of the exit status?</p>
  
  <p>Is there anything that I missed while upgrading?</p>
  
  <p>Ref: <a href="http://docs.spring.io/spring-batch/reference/html/configureJob.html" rel="noreferrer">http://docs.spring.io/spring-batch/reference/html/configureJob.html</a></p>