|
@@ -5,7 +5,6 @@ import org.slf4j.MDC;
|
|
import org.springframework.lang.Nullable;
|
|
import org.springframework.lang.Nullable;
|
|
import org.springframework.util.StopWatch;
|
|
import org.springframework.util.StopWatch;
|
|
import org.springframework.util.StreamUtils;
|
|
import org.springframework.util.StreamUtils;
|
|
-import org.springframework.util.StringUtils;
|
|
|
|
import org.springframework.web.servlet.HandlerInterceptor;
|
|
import org.springframework.web.servlet.HandlerInterceptor;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
@@ -52,7 +51,7 @@ public class RequestLogHandlerInterceptor implements HandlerInterceptor {
|
|
// log.info("查询参数: {}", JSON.toJSONString(parameters));
|
|
// log.info("查询参数: {}", JSON.toJSONString(parameters));
|
|
// 请求体参数
|
|
// 请求体参数
|
|
String body = StreamUtils.copyToString(request.getInputStream(), Charset.forName(request.getCharacterEncoding()));
|
|
String body = StreamUtils.copyToString(request.getInputStream(), Charset.forName(request.getCharacterEncoding()));
|
|
- log.info("请求参数: {}", StringUtils.trimAllWhitespace(body));
|
|
|
|
|
|
+ log.info("请求参数: \n{}", body);
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|