title: Spring Batch Exit Job If Step Fails
body: <p>I want a job to exit if a step within the job fails. I'm using Spring Batch annotation and not XML.</p>
  
  <p>I have a job step defined below:</p>
  
  <pre><code>@Bean(name = "callM204Step")
      public Step callM204Step(StepBuilderFactory stepFactory, CallM204ProgramTasklet task) {
          return stepFactory.get("callM204Step") //
                  .tasklet(task) //
                  .allowStartIfComplete(true) //
                  .build();
      }
  </code></pre>
  
  <p>If this step fails, how can I exit the job?</p>