ServletUtils
서블릿 유틸리티. 요청/응답 래핑.
확장 함수
toContentCachingRequestWrapper()
fun HttpServletRequest.toContentCachingRequestWrapper(): ContentCachingRequestWrapper요청을 ContentCachingRequestWrapper로 래핑. 이미 래핑된 경우 그대로 반환.
toContentCachingResponseWrapper()
fun HttpServletResponse.toContentCachingResponseWrapper(): ContentCachingResponseWrapper응답을 ContentCachingResponseWrapper로 래핑. 이미 래핑된 경우 그대로 반환.
사용처
- 로깅 필터에서 요청/응답 본문 캐싱
- 요청/응답 본문 재사용