class RestController {

    @ExceptionHandler(value = { MissingAnyOfOptionalServletRequestParametersException.class,
            MissingServletRequestParameterException.class })
    public @ResponseBody
    ResponseEntity<BadRequest> handleMissingRequestParameter(ServletRequestBindingException exception,
            HttpServletRequest req)
    {
        return new ResponseEntity<BadRequest>(handleBadRequest(exception, req), HttpStatus.BAD_REQUEST);
    }

}