From a8abf584323bb838a920b376205eb667e66e14f1 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Tue, 26 Mar 2024 11:06:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/win/{qad => bank}/Application.java | 2 +- .../com/win/{qad => bank}/common/CommonResult.java | 8 ++++---- .../win/{qad => bank}/config/RestTemplateConfig.java | 2 +- .../com/win/{qad => bank}/exception/ErrorCode.java | 2 +- .../exception/GlobalErrorCodeConstants.java | 2 +- .../win/{qad => bank}/exception/ServerException.java | 2 +- .../win/{qad => bank}/exception/ServiceException.java | 2 +- .../{qad => bank}/handler/GlobalExceptionHandler.java | 10 +++++----- 8 files changed, 15 insertions(+), 15 deletions(-) rename src/main/java/com/win/{qad => bank}/Application.java (95%) rename src/main/java/com/win/{qad => bank}/common/CommonResult.java (94%) rename src/main/java/com/win/{qad => bank}/config/RestTemplateConfig.java (97%) rename src/main/java/com/win/{qad => bank}/exception/ErrorCode.java (92%) rename src/main/java/com/win/{qad => bank}/exception/GlobalErrorCodeConstants.java (98%) rename src/main/java/com/win/{qad => bank}/exception/ServerException.java (97%) rename src/main/java/com/win/{qad => bank}/exception/ServiceException.java (97%) rename src/main/java/com/win/{qad => bank}/handler/GlobalExceptionHandler.java (87%) diff --git a/src/main/java/com/win/qad/Application.java b/src/main/java/com/win/bank/Application.java similarity index 95% rename from src/main/java/com/win/qad/Application.java rename to src/main/java/com/win/bank/Application.java index fb30f3f..3d5dce2 100644 --- a/src/main/java/com/win/qad/Application.java +++ b/src/main/java/com/win/bank/Application.java @@ -1,4 +1,4 @@ -package com.win.qad; +package com.win.bank; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/src/main/java/com/win/qad/common/CommonResult.java b/src/main/java/com/win/bank/common/CommonResult.java similarity index 94% rename from src/main/java/com/win/qad/common/CommonResult.java rename to src/main/java/com/win/bank/common/CommonResult.java index 467dd12..f3f15be 100644 --- a/src/main/java/com/win/qad/common/CommonResult.java +++ b/src/main/java/com/win/bank/common/CommonResult.java @@ -1,9 +1,9 @@ -package com.win.qad.common; +package com.win.bank.common; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.win.qad.exception.ErrorCode; -import com.win.qad.exception.GlobalErrorCodeConstants; -import com.win.qad.exception.ServiceException; +import com.win.bank.exception.ErrorCode; +import com.win.bank.exception.GlobalErrorCodeConstants; +import com.win.bank.exception.ServiceException; import lombok.Data; import org.springframework.util.Assert; diff --git a/src/main/java/com/win/qad/config/RestTemplateConfig.java b/src/main/java/com/win/bank/config/RestTemplateConfig.java similarity index 97% rename from src/main/java/com/win/qad/config/RestTemplateConfig.java rename to src/main/java/com/win/bank/config/RestTemplateConfig.java index 5b0d3f4..dfae1ea 100644 --- a/src/main/java/com/win/qad/config/RestTemplateConfig.java +++ b/src/main/java/com/win/bank/config/RestTemplateConfig.java @@ -1,4 +1,4 @@ -package com.win.qad.config; +package com.win.bank.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/src/main/java/com/win/qad/exception/ErrorCode.java b/src/main/java/com/win/bank/exception/ErrorCode.java similarity index 92% rename from src/main/java/com/win/qad/exception/ErrorCode.java rename to src/main/java/com/win/bank/exception/ErrorCode.java index e9850f3..5221d06 100644 --- a/src/main/java/com/win/qad/exception/ErrorCode.java +++ b/src/main/java/com/win/bank/exception/ErrorCode.java @@ -1,4 +1,4 @@ -package com.win.qad.exception; +package com.win.bank.exception; import lombok.Data; diff --git a/src/main/java/com/win/qad/exception/GlobalErrorCodeConstants.java b/src/main/java/com/win/bank/exception/GlobalErrorCodeConstants.java similarity index 98% rename from src/main/java/com/win/qad/exception/GlobalErrorCodeConstants.java rename to src/main/java/com/win/bank/exception/GlobalErrorCodeConstants.java index 2319aa8..2398956 100644 --- a/src/main/java/com/win/qad/exception/GlobalErrorCodeConstants.java +++ b/src/main/java/com/win/bank/exception/GlobalErrorCodeConstants.java @@ -1,4 +1,4 @@ -package com.win.qad.exception; +package com.win.bank.exception; /** * 全局错误码枚举 diff --git a/src/main/java/com/win/qad/exception/ServerException.java b/src/main/java/com/win/bank/exception/ServerException.java similarity index 97% rename from src/main/java/com/win/qad/exception/ServerException.java rename to src/main/java/com/win/bank/exception/ServerException.java index 7c13ceb..7d1536d 100644 --- a/src/main/java/com/win/qad/exception/ServerException.java +++ b/src/main/java/com/win/bank/exception/ServerException.java @@ -1,4 +1,4 @@ -package com.win.qad.exception; +package com.win.bank.exception; import lombok.Data; import lombok.EqualsAndHashCode; diff --git a/src/main/java/com/win/qad/exception/ServiceException.java b/src/main/java/com/win/bank/exception/ServiceException.java similarity index 97% rename from src/main/java/com/win/qad/exception/ServiceException.java rename to src/main/java/com/win/bank/exception/ServiceException.java index ab53a57..b7acdee 100644 --- a/src/main/java/com/win/qad/exception/ServiceException.java +++ b/src/main/java/com/win/bank/exception/ServiceException.java @@ -1,4 +1,4 @@ -package com.win.qad.exception; +package com.win.bank.exception; import lombok.Data; import lombok.EqualsAndHashCode; diff --git a/src/main/java/com/win/qad/handler/GlobalExceptionHandler.java b/src/main/java/com/win/bank/handler/GlobalExceptionHandler.java similarity index 87% rename from src/main/java/com/win/qad/handler/GlobalExceptionHandler.java rename to src/main/java/com/win/bank/handler/GlobalExceptionHandler.java index 7c469a5..5c6b6ea 100644 --- a/src/main/java/com/win/qad/handler/GlobalExceptionHandler.java +++ b/src/main/java/com/win/bank/handler/GlobalExceptionHandler.java @@ -1,15 +1,15 @@ -package com.win.qad.handler; +package com.win.bank.handler; -import com.win.qad.common.CommonResult; -import com.win.qad.exception.ServiceException; +import com.win.bank.common.CommonResult; +import com.win.bank.exception.ServiceException; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; import javax.servlet.http.HttpServletRequest; -import static com.win.qad.exception.GlobalErrorCodeConstants.INTERFACE_ERROR; -import static com.win.qad.exception.GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR; +import static com.win.bank.exception.GlobalErrorCodeConstants.INTERFACE_ERROR; +import static com.win.bank.exception.GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR; /** * 全局异常处理器,将 Exception 翻译成 CommonResult + 对应的异常编号