创建
NotFoundException带有
@ResponseStatus(HttpStatus.NOT_FOUND)注释的类,然后将其从控制器中抛出。
@ResponseStatus(pre = HttpStatus.NOT_FOUND, reason = "video not found")public class VideonotFoundException extends RuntimeException {}
创建
NotFoundException带有
@ResponseStatus(HttpStatus.NOT_FOUND)注释的类,然后将其从控制器中抛出。
@ResponseStatus(pre = HttpStatus.NOT_FOUND, reason = "video not found")public class VideonotFoundException extends RuntimeException {}