Skip to content

Commit

Permalink
fix: 로깅 적용 후 예외 응답 불가 버그 수정 (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arachneee authored Aug 20, 2024
1 parent 90daed5 commit 5974939
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package server.haengdong.config;

import jakarta.servlet.Filter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import java.io.IOException;
import org.springframework.stereotype.Component;
import org.springframework.web.util.ContentCachingRequestWrapper;

@Component
public class RequestServletFilter implements Filter {

@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
ContentCachingRequestWrapper wrappedRequest = new ContentCachingRequestWrapper((HttpServletRequest) request);

chain.doFilter(wrappedRequest, response);
}
}

0 comments on commit 5974939

Please sign in to comment.