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