更新工作台的url,更新异常拦截返回的http状态码为500

pull/65/head
fengshuonan 4 years ago
parent da60c89600
commit 3c4ad004c8

@ -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());

@ -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";
}
Loading…
Cancel
Save