How to enable gzip in spring boot?
by only editing application.yaml file.
How to enable gzip in spring boot?
by only editing application.yaml file.

It turns out Spring boot framework enables to use gzip fairly easily, the only thing we have to do is to add below code to the application.yml file or files under the server:
server:
compression:
enabled: true
min-response-size: 1024
mime-types: application/json,application/xml,text/html,text/plain,text/css,text/javascript,application/javascript
Thats it, to check, call the api and you should be able to see “Content-Encoding: gzip”. Thats how you know it is working.

Thanks for reading my post.
메타데이터
- post_id
- 3cb2d63a242e
- slug
- how-to-enable-gzip-in-spring-boot-3cb2d63a242e
- url
- https://medium.com/@azizbekjuraev/how-to-enable-gzip-in-spring-boot-3cb2d63a242e
- canonical_url
- https://medium.com/@azizbekjuraev/how-to-enable-gzip-in-spring-boot-3cb2d63a242e
- author_url
- https://medium.com/@azizbekjuraev
- status
- ok
- fetched_at
- 2026-06-20 20:29:01