Commit 8db9e3b5 authored by 赵啸非's avatar 赵啸非

添加站点查询子站点接口

parent e7e97f1c
......@@ -66,11 +66,18 @@ public class WebLogAspect {
Map<String, String> map = MDC.getCopyOfContextMap();
if (map != null&&result!=null) {
String startTime = map.getOrDefault("startTime", String.valueOf(System.currentTimeMillis()));
long takeTime = (System.currentTimeMillis() - Long.parseLong(startTime));
if(result instanceof String){
log.info(" \n 请求路径:{} 耗时:{}ms \n 请求报文:{} \n 响应报文:{}"
, request.getRequestURI(), takeTime, map.getOrDefault("req", ""), result == null ? "" : result);
}else{
log.info(" \n 请求路径:{} 耗时:{}ms \n 请求报文:{} \n 响应报文:{}"
, request.getRequestURI(), takeTime, map.getOrDefault("req", ""), result == null ? "" : JSON.toJSONString(result));
}
}
}
/**
......
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