|
@@ -1,5 +1,6 @@
|
|
|
package com.simuwang.deploy.components;
|
|
|
|
|
|
+import cn.hutool.core.collection.ListUtil;
|
|
|
import cn.hutool.core.exceptions.ExceptionUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.core.util.URLUtil;
|
|
@@ -20,6 +21,8 @@ import org.springframework.core.annotation.Order;
|
|
|
import org.springframework.http.HttpMethod;
|
|
|
import org.springframework.util.StopWatch;
|
|
|
|
|
|
+import java.util.Iterator;
|
|
|
+import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
|
|
|
/**
|
|
@@ -81,7 +84,14 @@ public class LoggingAspect {
|
|
|
boolean uploadRequest = isUploadRequest(request);
|
|
|
StringBuilder params;
|
|
|
if (request.getMethod().equalsIgnoreCase(HttpMethod.GET.name()) && !uploadRequest) {
|
|
|
- params = new StringBuilder(Objects.toString(request.getParameterMap()));
|
|
|
+ List<String> tempList = ListUtil.list(false);
|
|
|
+ Iterator<String> paramNames = request.getParameterNames().asIterator();
|
|
|
+ while (paramNames.hasNext()) {
|
|
|
+ String param = paramNames.next();
|
|
|
+ String value = request.getParameter(param);
|
|
|
+ tempList.add(param + "=" + value);
|
|
|
+ }
|
|
|
+ params = new StringBuilder(String.join(",", tempList));
|
|
|
} else {
|
|
|
params = new StringBuilder();
|
|
|
for (Object arg : args) {
|