mirror of https://gitee.com/stylefeng/guns
更新工作台的url,更新异常拦截返回的http状态码为500
parent
da60c89600
commit
3c4ad004c8
|
@ -136,6 +136,7 @@ public class GlobalExceptionHandler {
|
||||||
*/
|
*/
|
||||||
@ExceptionHandler(BindException.class)
|
@ExceptionHandler(BindException.class)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR)
|
||||||
public ErrorResponseData bindException(BindException e) {
|
public ErrorResponseData bindException(BindException e) {
|
||||||
String bindingResult = getArgNotValidMessage(e.getBindingResult());
|
String bindingResult = getArgNotValidMessage(e.getBindingResult());
|
||||||
return renderJson(ValidatorExceptionEnum.VALIDATED_RESULT_ERROR, bindingResult);
|
return renderJson(ValidatorExceptionEnum.VALIDATED_RESULT_ERROR, bindingResult);
|
||||||
|
@ -149,6 +150,7 @@ public class GlobalExceptionHandler {
|
||||||
*/
|
*/
|
||||||
@ExceptionHandler(ValidationException.class)
|
@ExceptionHandler(ValidationException.class)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR)
|
||||||
public ErrorResponseData bindException(ValidationException e) {
|
public ErrorResponseData bindException(ValidationException e) {
|
||||||
if (e.getCause() instanceof ParamValidateException) {
|
if (e.getCause() instanceof ParamValidateException) {
|
||||||
ParamValidateException paramValidateException = (ParamValidateException) e.getCause();
|
ParamValidateException paramValidateException = (ParamValidateException) e.getCause();
|
||||||
|
@ -164,6 +166,7 @@ public class GlobalExceptionHandler {
|
||||||
* @date 2020/12/16 15:11
|
* @date 2020/12/16 15:11
|
||||||
*/
|
*/
|
||||||
@ExceptionHandler(ServiceException.class)
|
@ExceptionHandler(ServiceException.class)
|
||||||
|
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ErrorResponseData businessError(ServiceException e) {
|
public ErrorResponseData businessError(ServiceException e) {
|
||||||
log.error("业务异常,具体信息为:{}", e.getMessage());
|
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.ApiResource;
|
||||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
||||||
|
@ -14,7 +14,7 @@ import org.springframework.stereotype.Controller;
|
||||||
@Controller
|
@Controller
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ApiResource(name = "工作台和分析页面")
|
@ApiResource(name = "工作台和分析页面")
|
||||||
public class BlackboardViewController {
|
public class DashboardViewController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工作台
|
* 工作台
|
||||||
|
@ -22,7 +22,7 @@ public class BlackboardViewController {
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @date 2018/12/24 22:43
|
* @date 2018/12/24 22:43
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "工作台", path = "/blackboard/platform", requiredPermission = false)
|
@GetResource(name = "工作台", path = "/dashboard/workplace", requiredPermission = false)
|
||||||
public String platform() {
|
public String platform() {
|
||||||
return "/modular/blackboard/board_platform.html";
|
return "/modular/blackboard/board_platform.html";
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public class BlackboardViewController {
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @date 2020/12/29 21:27
|
* @date 2020/12/29 21:27
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "分析页面", path = "/blackboard/analyse", requiredPermission = false)
|
@GetResource(name = "分析页面", path = "/dashboard/analysis", requiredPermission = false)
|
||||||
public String analyse() {
|
public String analyse() {
|
||||||
return "/modular/blackboard/board_analyse.html";
|
return "/modular/blackboard/board_analyse.html";
|
||||||
}
|
}
|
Loading…
Reference in New Issue