title: Change Spring Boots default JSON error response structure
body: <p>I have an API built with Spring Boot. By default the default JSON structure when an error is thrown by Spring is;</p>
  
  <pre><code>{
    "timestamp": 1477425179601,
    "status": 404,
    "error": "Not Found",
    "message": "No message available",
    "path": "/categoriess"
  }
  </code></pre>
  
  <p>This structure is different to error responses returning myself in the API, so I'd like to change Spring to use the same structure as my own for consistency.</p>
  
  <p>My error response are structured like this;</p>
  
  <pre><code>{
      "errors": [
          {
              "code": 999404,
              "message": "The resource you were looking for could not be found"
          }
      ]
  }
  </code></pre>
  
  <p>How would I go about doing this? I've tried using an Exception Handler, but I can't figure out the correct exception to set it up for. I'd like to also make sure that the Http status is still correctly returned as 404, or whatever the error is (500 etc).</p>