title: How to add custom status code in spring data rest
body: <p>I'm doing Spring Data REST. Following the simple example for getting started described here: <a href="http://spring.io/guides/gs/accessing-data-rest/" rel="nofollow">http://spring.io/guides/gs/accessing-data-rest/</a> I have a question I'm thinking about.</p>
  
  <p>The query "curl <a href="http://localhost:8080/people/search/findByLastName?name=Baggins" rel="nofollow">http://localhost:8080/people/search/findByLastName?name=Baggins</a>" will return HTTP Status 200, (OK) even if no results were found (the json will be {}). How can I make it return HTTP status 404 instead (when no result were found).</p>
  
  <p>The documentation only mentions the standard status codes: <a href="http://docs.spring.io/spring-data/rest/docs/current/reference/html/#repository-resources" rel="nofollow">http://docs.spring.io/spring-data/rest/docs/current/reference/html/#repository-resources</a></p>