RequestLog1 SpringBoot - http request와 response 로깅하기 웹 어플리케이션을 운영하다 보면 http의 request와 response 로그가 필요한 경우가 있다. 기본적으로 SpringBoot 에서는 http의 request, response 를 로깅하지 않으므로 개발자는 추가로 설정을 해줘야 한다. 먼저, Spring MVC Request Lifecycle 을 이해해야 함으로 아래 그림을 참고 하자 본 글에서는 Filter와 HandlerInterceptor를 사용하여 로깅을 할 예정이다. Http logging 방법은 2가지가 있다. Custom Request, Response 로깅 1. RequestWrapper와 ResponseWrapper 클래스를 만든다. Wrapper를 만드는 이유는 HttpServletRequest 의 InputStream 은 오직.. 2020. 8. 5. 이전 1 다음