|
@@ -15,6 +15,7 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
/**
|
|
|
* 统一捕捉异常,自定义返回参数
|
|
|
+ * 这里只可以捕获controller层的异常。
|
|
|
*/
|
|
|
@RestControllerAdvice
|
|
|
public class ExceptionController {
|
|
@@ -51,10 +52,13 @@ public class ExceptionController {
|
|
|
}
|
|
|
|
|
|
|
|
|
-// @ResponseStatus(HttpStatus.UNAUTHORIZED)
|
|
|
+// @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
|
|
// @ExceptionHandler(AuthenticationException.class)
|
|
|
// public R handle40001() {
|
|
|
-// return new R(40005, "Unauthorized");
|
|
|
+// System.out.println("3333");
|
|
|
+// return new R(40005, "token1111 invalid");
|
|
|
// }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|