From 3c4ad004c82eaad6c08716055962be32ed87076c Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Fri, 1 Jan 2021 16:55:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=B7=A5=E4=BD=9C=E5=8F=B0?= =?UTF-8?q?=E7=9A=84url=EF=BC=8C=E6=9B=B4=E6=96=B0=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E6=8B=A6=E6=88=AA=E8=BF=94=E5=9B=9E=E7=9A=84http=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E7=A0=81=E4=B8=BA500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stylefeng/guns/core/error/GlobalExceptionHandler.java | 3 +++ .../DashboardViewController.java} | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) rename src/main/java/cn/stylefeng/guns/modular/{blackboard/BlackboardViewController.java => dashboard/DashboardViewController.java} (73%) diff --git a/src/main/java/cn/stylefeng/guns/core/error/GlobalExceptionHandler.java b/src/main/java/cn/stylefeng/guns/core/error/GlobalExceptionHandler.java index e843f2a9..968f5e05 100644 --- a/src/main/java/cn/stylefeng/guns/core/error/GlobalExceptionHandler.java +++ b/src/main/java/cn/stylefeng/guns/core/error/GlobalExceptionHandler.java @@ -136,6 +136,7 @@ public class GlobalExceptionHandler { */ @ExceptionHandler(BindException.class) @ResponseBody + @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR) public ErrorResponseData bindException(BindException e) { String bindingResult = getArgNotValidMessage(e.getBindingResult()); return renderJson(ValidatorExceptionEnum.VALIDATED_RESULT_ERROR, bindingResult); @@ -149,6 +150,7 @@ public class GlobalExceptionHandler { */ @ExceptionHandler(ValidationException.class) @ResponseBody + @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR) public ErrorResponseData bindException(ValidationException e) { if (e.getCause() instanceof ParamValidateException) { ParamValidateException paramValidateException = (ParamValidateException) e.getCause(); @@ -164,6 +166,7 @@ public class GlobalExceptionHandler { * @date 2020/12/16 15:11 */ @ExceptionHandler(ServiceException.class) + @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) @ResponseBody public ErrorResponseData businessError(ServiceException e) { log.error("业务异常,具体信息为:{}", e.getMessage()); diff --git a/src/main/java/cn/stylefeng/guns/modular/blackboard/BlackboardViewController.java b/src/main/java/cn/stylefeng/guns/modular/dashboard/DashboardViewController.java similarity index 73% rename from src/main/java/cn/stylefeng/guns/modular/blackboard/BlackboardViewController.java rename to src/main/java/cn/stylefeng/guns/modular/dashboard/DashboardViewController.java index c603d53e..7e59a4f5 100644 --- a/src/main/java/cn/stylefeng/guns/modular/blackboard/BlackboardViewController.java +++ b/src/main/java/cn/stylefeng/guns/modular/dashboard/DashboardViewController.java @@ -1,4 +1,4 @@ -package cn.stylefeng.guns.modular.blackboard; +package cn.stylefeng.guns.modular.dashboard; import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource; import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource; @@ -14,7 +14,7 @@ import org.springframework.stereotype.Controller; @Controller @Slf4j @ApiResource(name = "工作台和分析页面") -public class BlackboardViewController { +public class DashboardViewController { /** * 工作台 @@ -22,7 +22,7 @@ public class BlackboardViewController { * @author fengshuonan * @date 2018/12/24 22:43 */ - @GetResource(name = "工作台", path = "/blackboard/platform", requiredPermission = false) + @GetResource(name = "工作台", path = "/dashboard/workplace", requiredPermission = false) public String platform() { return "/modular/blackboard/board_platform.html"; } @@ -33,7 +33,7 @@ public class BlackboardViewController { * @author fengshuonan * @date 2020/12/29 21:27 */ - @GetResource(name = "分析页面", path = "/blackboard/analyse", requiredPermission = false) + @GetResource(name = "分析页面", path = "/dashboard/analysis", requiredPermission = false) public String analyse() { return "/modular/blackboard/board_analyse.html"; }