瀏覽代碼

【修复】参数传递错误,打印具体信息

就是那个锅 4 年之前
父節點
當前提交
bdcda19b9f

+ 2 - 2
guns-base-support/guns-system/src/main/java/cn/stylefeng/guns/sys/core/error/GlobalExceptionHandler.java

@ -127,7 +127,7 @@ public class GlobalExceptionHandler {
    @ExceptionHandler(HttpMessageNotReadableException.class)
    @ResponseBody
    public ErrorResponseData httpMessageNotReadable(HttpMessageNotReadableException e) {
        log.error(">>> 参数格式传递异常,请求号为:{},具体信息为:{}", RequestNoContext.get(), RequestTypeExceptionEnum.REQUEST_JSON_ERROR.getMessage());
        log.error(">>> 参数格式传递异常,请求号为:{},具体信息为:{}", RequestNoContext.get(), e.getMessage());
        return renderJson(RequestTypeExceptionEnum.REQUEST_JSON_ERROR);
    }
@ -140,7 +140,7 @@ public class GlobalExceptionHandler {
    @ExceptionHandler(HttpMediaTypeNotSupportedException.class)
    @ResponseBody
    public ErrorResponseData httpMediaTypeNotSupport(HttpMediaTypeNotSupportedException e) {
        log.error(">>> 参数格式传递异常,请求号为:{},具体信息为:{}", RequestNoContext.get(), RequestTypeExceptionEnum.REQUEST_TYPE_IS_JSON.getMessage());
        log.error(">>> 参数格式传递异常,请求号为:{},具体信息为:{}", RequestNoContext.get(), e.getMessage());
        return renderJson(RequestTypeExceptionEnum.REQUEST_TYPE_IS_JSON);
    }