返回一个指定的http response状态码。
@ResponseStatus(value = HttpStatus.NOT_FOUND, reason = "IOException occured") @ExceptionHandler(IOException.class) @ResponseBody public void handleIOException() { // returning 404 error code }
返回一个指定的http response状态码。
@ResponseStatus(value = HttpStatus.NOT_FOUND, reason = "IOException occured") @ExceptionHandler(IOException.class) @ResponseBody public void handleIOException() { // returning 404 error code }