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"; }