From 675c3b5d83b928c2bfbb84cd99a7d3f222d4432c Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期四, 05 三月 2026 10:18:16 +0800
Subject: [PATCH] 1
---
zy-acs-cv/src/main/java/com/zy/common/config/CoolExceptionHandler.java | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/zy-acs-cv/src/main/java/com/zy/common/config/CoolExceptionHandler.java b/zy-acs-cv/src/main/java/com/zy/common/config/CoolExceptionHandler.java
index 9a6fe2d..16e4161 100644
--- a/zy-acs-cv/src/main/java/com/zy/common/config/CoolExceptionHandler.java
+++ b/zy-acs-cv/src/main/java/com/zy/common/config/CoolExceptionHandler.java
@@ -1,7 +1,7 @@
package com.zy.common.config;
-import com.core.common.R;
-import com.core.exception.CoolException;
+import com.zy.acs.common.domain.BaseResult;
+import com.zy.acs.framework.exception.CoolException;
import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@@ -14,19 +14,19 @@
public class CoolExceptionHandler {
@ExceptionHandler(Exception.class)
- public R handlerException(HandlerMethod handler, Exception e) {
+ public BaseResult handlerException(HandlerMethod handler, Exception e) {
e.printStackTrace();
- return R.error();
+ return BaseResult.error();
}
@ExceptionHandler(HttpRequestMethodNotSupportedException.class)
- public R handleHttpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException e) {
- return R.error();
+ public BaseResult handleHttpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException e) {
+ return BaseResult.error();
}
@ExceptionHandler(CoolException.class)
- public R handleRRException(CoolException e) {
- return R.parse(e.getMessage());
+ public BaseResult handleRRException(Exception e) {
+ return BaseResult.error(e.getMessage());
}
}
--
Gitblit v1.9.1