스프링에서 응답하는 메시지 크기를 압축하기 위해서 스프링 설정 파일에서 값들을 설정할 수 있다. .yml 파일이나 .properties 파일에서 해당 값을 설정한다.

server:
	compression:
		enabled: true
		min-response-size: 10
		mime-types: "text/html"

응답 메시지가 압축되었을 경우 HTTP 응답 메시지 헤더에 "Transfer-Encoding" 의 값이 "chunked" 로 표신된다.

Untitled

https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto.webserver.enable-response-compression