I am really not sure if this is feasible using Spring 3.2 MVC.
My Controller has a method declared as below:
@RequestMapping(method = RequestMethod.GET)
If you return a ResponseEntity directly, you can set the HttpStatus in that:
// return with no body or headers return new ResponseEntity(HttpStatus.NOT_FOUND);
If you want to return an error other than 404, HttpStatus has lots of other values to choose from.