This commit is contained in:
77
2024-04-14 22:46:01 +08:00
parent bcb40cfc4a
commit 05c9cacf70
25 changed files with 99 additions and 42 deletions

View File

@@ -134,10 +134,12 @@ public class LogAspect {
// 获取参数的信息,传入到数据库中。
setRequestValue(joinPoint, operLog, log.excludeParamNames(),logString);
}
String jsonResultString = JsonUtils.toJsonString(jsonResult);
// 是否需要保存response参数和值
if (log.isSaveResponseData() && ObjectUtil.isNotNull(jsonResult)) {
String jsonResultString = JsonUtils.toJsonString(jsonResult);
operLog.setJsonResult(StringUtils.substring(jsonResultString, 0, 2000));
}
if(log.isPrintResponseData()){
logString.append(String.format("result=%s;",jsonResultString));
}
}