mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-07-20 23:49:33 +08:00
全局异常
This commit is contained in:
parent
3ca8350e97
commit
d91b3ac20d
@ -36,12 +36,12 @@ import java.util.List;
|
||||
@RestControllerAdvice
|
||||
@Slf4j
|
||||
public class ExceptionController {
|
||||
//
|
||||
// @ExceptionHandler(Exception.class)
|
||||
// public JsonResponse exceptionHandler(Exception e) {
|
||||
// log.error(e.getMessage());
|
||||
// return JsonResponse.error("系统错误", 500);
|
||||
// }
|
||||
|
||||
@ExceptionHandler(Exception.class)
|
||||
public JsonResponse exceptionHandler(Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return JsonResponse.error("系统错误", 500);
|
||||
}
|
||||
|
||||
@ExceptionHandler(ServiceException.class)
|
||||
public JsonResponse serviceExceptionHandler(ServiceException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user