Commit d5840302 authored by yanzg's avatar yanzg

不记录系统日志

parent bed62e59
......@@ -38,6 +38,12 @@ public class LogVo extends BaseVo {
@ApiModelProperty(value = "请求内容", required = true, example = "{}")
private String content;
/**
* 执行后的请求内容
*/
@ApiModelProperty(value = "执行后的请求内容,仅仅在内容有变化时写入", required = true, example = "{}")
private String contentTo;
/**
* 返回参数
*/
......@@ -94,6 +100,14 @@ public class LogVo extends BaseVo {
this.content = content;
}
public String getContentTo() {
return contentTo;
}
public void setContentTo(String contentTo) {
this.contentTo = contentTo;
}
public String getResult() {
return result;
}
......
......@@ -203,8 +203,9 @@ public class BaseRequestAspect {
protected void responseLog(Class<?> cls, String tag, String url, boolean logFlag, long start,
String requestBody, Object result, Exception resultEx, LogVo log) {
try {
log.setContent(requestBody);
if (!StringHelper.compare(log.getContent(), requestBody)) {
log.setContentTo(requestBody);
}
long time = System.currentTimeMillis() - start;
boolean isLogDisplay = (logFlag && logCommon) || resultEx != null;
boolean isLogDatabase = log != null || resultEx != null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment