mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-07-24 02:09:35 +08:00
全局异常捕获
This commit is contained in:
parent
8da402255c
commit
4689073d4f
@ -37,11 +37,11 @@ import java.util.List;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class ExceptionController {
|
public class ExceptionController {
|
||||||
|
|
||||||
// @ExceptionHandler(Exception.class)
|
@ExceptionHandler(Exception.class)
|
||||||
// public JsonResponse exceptionHandler(Exception e) {
|
public JsonResponse exceptionHandler(Exception e) {
|
||||||
// log.error(e.getMessage());
|
log.error(e.getMessage());
|
||||||
// return JsonResponse.error("系统错误", 500);
|
return JsonResponse.error("系统错误", 500);
|
||||||
// }
|
}
|
||||||
|
|
||||||
@ExceptionHandler(ServiceException.class)
|
@ExceptionHandler(ServiceException.class)
|
||||||
public JsonResponse serviceExceptionHandler(ServiceException e) {
|
public JsonResponse serviceExceptionHandler(ServiceException e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user