12.19 异常捕获补充

在自定义异常中,状态值默认200,

注意一般成功状态值为200,失败状态值定位403 405 或者其他

public class ResponseBanExcetion extends  RuntimeException{

}

  异常捕获及状态值更改

 @ExceptionHandler(value = ResponseBanExcetion.class)
@ResponseStatus(HttpStatus.FORBIDDEN)
    public ModelAndView handlerAuthorizeException() {
       }

  

 

  

:

posted on 2017-12-19 09:58  唐浩199  阅读(73)  评论(0编辑  收藏  举报

导航