common-trace去掉请求wrapper包装类
This commit is contained in:
parent
e8605c2aa5
commit
82d85e447d
@ -50,10 +50,6 @@ public class RequestLogHandlerInterceptor implements HandlerInterceptor, WebMvcC
|
||||
if (request.getDispatcherType().equals(DispatcherType.ERROR)) {
|
||||
return;
|
||||
}
|
||||
if (!(request instanceof BodyReaderHttpServletRequestWrapper)) {
|
||||
log.warn("print request log error : current request entity not support");
|
||||
return;
|
||||
}
|
||||
String method = request.getMethod();
|
||||
StringBuffer requestUrl = request.getRequestURL();
|
||||
|
||||
|
||||
@ -38,16 +38,8 @@ public class TraceIdFilter extends OncePerRequestFilter {
|
||||
protected void doFilterInternal(@NonNull HttpServletRequest request,
|
||||
@NonNull HttpServletResponse response,
|
||||
@NonNull FilterChain filterChain) throws ServletException, IOException {
|
||||
|
||||
// wrapper
|
||||
BodyReaderHttpServletRequestWrapper bodyRequest = new BodyReaderHttpServletRequestWrapper(
|
||||
request);
|
||||
|
||||
// trace id 补充
|
||||
|
||||
ExceptionUtil.ignoreException(() -> setTraceId(bodyRequest, response), null);
|
||||
|
||||
|
||||
ExceptionUtil.ignoreException(() -> setTraceId(request, response), null);
|
||||
//do
|
||||
try {
|
||||
filterChain.doFilter(request, response);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user