fix processRequestLog

This commit is contained in:
jinhaiyang 2024-04-12 15:53:42 +08:00
parent 99b03a3b9b
commit c4e76ec5ea

View File

@ -72,7 +72,7 @@ public class RequestLogHandlerInterceptor implements HandlerInterceptor, WebMvcC
boolean isJson = JSONUtil.isTypeJSON(body);
boolean shortLength = body.length() < 4000;
if (shortLength) {
body = isJson ? JSONUtil.toJsonStr( JSONUtil.isTypeJSONObject(body) ? JSON.parseObject(body) : JSON.parseArray(body)) : body;
body = isJson ? JSONUtil.toJsonStr(JSONUtil.isTypeJSONObject(body) ? JSON.parseObject(body) : JSON.parseArray(body)) : body;
log.info("[requestUrl:{}][method:{}][param:{}][body:{}]", requestUrl, method,
JSON.toJSONString(request.getParameterMap()), body);
return;