mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-17 00:44:41 +08:00
代码格式化
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
/**
|
||||
* This file is part of the PlayEdu.
|
||||
* (c) 杭州白书科技有限公司
|
||||
*/
|
||||
package xyz.playedu.api.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.springframework.http.converter.HttpMessageNotReadableException;
|
||||
import org.springframework.validation.ObjectError;
|
||||
import org.springframework.web.HttpRequestMethodNotSupportedException;
|
||||
@@ -9,6 +14,7 @@ import org.springframework.web.bind.MissingServletRequestParameterException;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
|
||||
|
||||
import xyz.playedu.api.exception.LimitException;
|
||||
import xyz.playedu.api.exception.NotFoundException;
|
||||
import xyz.playedu.api.exception.ServiceException;
|
||||
@@ -20,11 +26,11 @@ import java.util.List;
|
||||
@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) {
|
||||
@@ -71,5 +77,4 @@ public class ExceptionController {
|
||||
public JsonResponse serviceExceptionHandler(LimitException e) {
|
||||
return JsonResponse.error("请稍后再试", 429);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user