Commit aaa9f24d authored by yanzg's avatar yanzg

检测值

parent 7db17030
......@@ -26,8 +26,13 @@ import org.springframework.stereotype.Component;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.LinkedBlockingQueue;
/**
......@@ -208,11 +213,18 @@ public class WebAspect extends AbstractValidateAspect implements ThreadNext.Next
logInterVo.setLogId(StringHelper.getNewID());
logInterVo.setLogSources(applicationName);//平台名
logInterVo.setInterUrl(url);//请求URL
Object para = joinPoint.getArgs();
if (joinPoint.getArgs().length == 1) {
para = joinPoint.getArgs()[0];
List<Object> para = new ArrayList<>();
for (Object item : joinPoint.getArgs()) {
if (item instanceof HttpServlet || item instanceof HttpServletResponse || item instanceof HttpServletRequest) {
continue;
}
logInterVo.setContent(JSON.toJSONString(para));//请求参数
para.add(item);
}
Object paraTo = para;
if (para.size() == 1) {
paraTo = para.get(0);
}
logInterVo.setContent(JSON.toJSONString(paraTo));//请求参数
logInterVo.setResult(JSON.toJSONString(responseResult));//返回参数
logInterVo.setStatus(responseResult.getCode() == ResultConstants.SUCCESS ? 1 : 0);
return logInterVo;
......@@ -224,7 +236,7 @@ public class WebAspect extends AbstractValidateAspect implements ThreadNext.Next
* @return 是否继续执行
*/
@Override
public boolean next() throws Exception {
public boolean next() {
while (cache.size() > 0) {
LogVo item = cache.poll();
if (item != 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