草庐IT

UnauthorizedException

全部标签

java - @ExceptionHandler 的顺序

我使用@ControllerAdvice来处理我所有的应用程序异常:@ControllerAdvicepublicclassExceptionHandlingController{@ExceptionHandler({UnauthorizedException.class})publicStringunauthorizedException(){.........}@ExceptionHandler({UnauthorizedAjaxException.class})@ResponseBodypublicvoidunauthorizedAjaxException(){.........