对aop日子中的结果进行json格式化处理,便于日志分析。

This commit is contained in:
shuzheng 2017-06-28 21:16:22 +08:00
parent 5e0311a602
commit c0dac50e57
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package com.zheng.upms.client.interceptor;
import com.alibaba.fastjson.JSON;
import com.zheng.common.util.RequestUtil;
import com.zheng.upms.dao.model.UpmsLog;
import com.zheng.upms.rpc.api.UpmsApiService;
@ -87,7 +88,7 @@ public class LogAspect {
} else {
upmsLog.setParameter(ObjectUtils.toString(request.getParameterMap()));
}
upmsLog.setResult(ObjectUtils.toString(result));
upmsLog.setResult(JSON.toJSONString(result));
upmsLog.setSpendTime((int) (endTime - startTime));
upmsLog.setStartTime(startTime);
upmsLog.setUri(request.getRequestURI());