防止记录日志转换出现的异常

master
RuoYi 3 years ago
parent a292cccb63
commit 36c058188a
  1. 6
      ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java

@ -166,10 +166,16 @@ public class LogAspect
for (Object o : paramsArray) for (Object o : paramsArray)
{ {
if (StringUtils.isNotNull(o) && !isFilterObject(o)) if (StringUtils.isNotNull(o) && !isFilterObject(o))
{
try
{ {
Object jsonObj = JSON.toJSON(o); Object jsonObj = JSON.toJSON(o);
params += jsonObj.toString() + " "; params += jsonObj.toString() + " ";
} }
catch (Exception e)
{
}
}
} }
} }
return params.trim(); return params.trim();

Loading…
Cancel
Save