Hi I'm using Spring-data-rest

Created Person entity and PersonRepository

public interface PersonRepository extends CrudRepository<Person, Long> {

@RestResource(path = "id")
public List<Person> findById(@Param("id") Long id);

}

From the above code, if I search with id number that is not existed in the database, returns Json code like:

{ "results" : [ ], "totalCount" : 0, "totalPages" : 1, "currentPage" : 1, "_links" : [ ] }

It should be better if it returns an exception like 204 or no values in db.

Please suggest..