Commit 5b5bd40b48538ce88d8ef6ad9439f3d556ae29cb
1 parent
fd1d97cb
fix(web): 修复全局异常处理被 JimuReport 拦截
Showing
1 changed file
with
2 additions
and
0 deletions
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java
| @@ -23,6 +23,7 @@ import jakarta.validation.ConstraintViolationException; | @@ -23,6 +23,7 @@ import jakarta.validation.ConstraintViolationException; | ||
| 23 | import jakarta.validation.ValidationException; | 23 | import jakarta.validation.ValidationException; |
| 24 | import lombok.AllArgsConstructor; | 24 | import lombok.AllArgsConstructor; |
| 25 | import lombok.extern.slf4j.Slf4j; | 25 | import lombok.extern.slf4j.Slf4j; |
| 26 | +import org.springframework.core.annotation.Order; | ||
| 26 | import org.springframework.http.converter.HttpMessageNotReadableException; | 27 | import org.springframework.http.converter.HttpMessageNotReadableException; |
| 27 | import org.springframework.security.access.AccessDeniedException; | 28 | import org.springframework.security.access.AccessDeniedException; |
| 28 | import org.springframework.util.Assert; | 29 | import org.springframework.util.Assert; |
| @@ -53,6 +54,7 @@ import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeC | @@ -53,6 +54,7 @@ import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeC | ||
| 53 | * @author 芋道源码 | 54 | * @author 芋道源码 |
| 54 | */ | 55 | */ |
| 55 | @RestControllerAdvice | 56 | @RestControllerAdvice |
| 57 | +@Order(0) // 优先于三方库默认的全局异常处理器,例如 JimuReport | ||
| 56 | @AllArgsConstructor | 58 | @AllArgsConstructor |
| 57 | @Slf4j | 59 | @Slf4j |
| 58 | public class GlobalExceptionHandler { | 60 | public class GlobalExceptionHandler { |