1、禅道bug#1512、#1511、#1506修复;2、全局异常HttpMessageNotReadableException提示优化;3、部分入参i18配置补充;

This commit is contained in:
gaoqr
2026-05-09 14:54:41 +08:00
parent 6bc9298294
commit 9a98f8e55c
12 changed files with 32 additions and 26 deletions
@@ -11,6 +11,7 @@ import com.cf.imes.framework.common.util.json.JsonUtils;
import com.cf.imes.framework.common.util.servlet.ServletUtils;
import com.cf.imes.module.infra.api.logger.ApiErrorLogApi;
import com.cf.imes.module.infra.api.logger.dto.ApiErrorLogCreateReqDTO;
import com.fasterxml.jackson.databind.exc.InvalidFormatException;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@@ -220,8 +221,13 @@ public class GlobalExceptionHandler {
@ExceptionHandler(value = HttpMessageNotReadableException.class)
public CommonResult httpMessageNotReadableExceptionHandler(HttpServletRequest req, HttpMessageNotReadableException ex) {
log.warn(String.format("==========[httpMessageNotReadableExceptionHandler]==========%s", ex.getMessage()));
return CommonResult.error(BAD_REQUEST);
String errMsg = ex.getMessage();
log.warn(String.format("==========[httpMessageNotReadableExceptionHandler]==========%s", errMsg));
Throwable cause = ex.getCause();
if (cause instanceof InvalidFormatException) {
errMsg = ((InvalidFormatException) cause).getValue().toString();
}
return CommonResult.error(BAD_REQUEST, errMsg);
}
/**