title: Spring Batch job execution status in response body
body: <p>I'm very new to Spring Batch and pretty confused</p>
  
  <p>I've got a controller with some request mappings. When I get a certain URL I want to print the job status to the response body. Here's some code:</p>
  
  <pre><code>@RequestMapping(value = "/batchExecution", method = RequestMethod.GET)
  @ResponseBody
  public String getJobExecutionStatus() {
      return "Hello world!";
  }
  </code></pre>
  
  <p>I've tried adding JobExecution to the method, but can you only access these elements with the JobExecutionListener?</p>
  
  <pre><code>@RequestMapping(value = "/batchExecution", method = RequestMethod.GET)
  @ResponseBody
  public String getJobExecutionStatus(JobExecution jobExecution) {
      return "Hello world!";
  }
  </code></pre>
  
  <p>sorry for my noobie questions, I can't find any documentation on what I'm looking for</p>