title: How to display customized error response in REST API
body: <p>My url is <a href="http://localhost:8090/employee/?emp_id=1551&amp;name=" rel="nofollow noreferrer">http://localhost:8090/employee/?emp_id=1551&amp;name=</a>  </p>
  
  <p>I am using Spring boot for designing REST application. I have used @RequestMapping and @RequestParam annotation for get resource. When I pass empty value to request parameter (for eg. name = ), I get below validation response(actual output section below).  </p>
  
  <p>However I wanted to override this output to display customized error response as below(expected section below).<br>
      How can I achieve this? How to avoid Spring's auto validation for input parameters in Get request?</p>
  
  <pre><code>Output
  ======
  {
      "timestamp": 1511144660708,
      "status": 400,
      "error": "Bad Request",
      "message": "Required String parameter 'name' is not present",
      "path": "/employee"
  }
  
  
  
  Expected
  ========
  
  {
      "errors":[
          {
          "id":"123144",
          "detail": "invalid user input"
          "status": "400"
          }
      ]
  }
  </code></pre>