代码格式化

This commit is contained in:
none
2023-04-07 10:03:45 +08:00
parent fc8ff14a24
commit f437b3ad4d
252 changed files with 7467 additions and 5770 deletions

View File

@@ -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);
}
}