diff --git a/src/main/java/net/educoder/handler/GlobalExceptionHandler.java b/src/main/java/net/educoder/handler/GlobalExceptionHandler.java index 581f228..5970b5b 100644 --- a/src/main/java/net/educoder/handler/GlobalExceptionHandler.java +++ b/src/main/java/net/educoder/handler/GlobalExceptionHandler.java @@ -2,7 +2,7 @@ package net.educoder.handler; import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; -import net.educoder.exception.BridgeException; +import net.educoder.exception.BusinessException; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ControllerAdvice; @@ -19,10 +19,10 @@ import org.springframework.web.bind.annotation.ResponseBody; @ControllerAdvice public class GlobalExceptionHandler { - @ExceptionHandler(BridgeException.class) + @ExceptionHandler(BusinessException.class) @ResponseBody - public ResponseEntity handleBridgeExceptions(BridgeException e) { - log.error("捕获到BridgeException", e); + public ResponseEntity handleBridgeExceptions(BusinessException e) { + log.error("捕获到BusinessException", e); JSONObject jsonObj = new JSONObject(); jsonObj.put("code", e.getCode());