Spring Boot Compression

stress-624220_640
I just remembered that in one of my SpringBoot projects I forgot to enable gzip compression. Don’t be me, always use compression, even if it’s not enabled by default, it’s really useful to reduce bandwidth and to speed up page loads. Here is the configuration I use (in yml format).

server:
  compression:
    enabled: true
    min-response-size: 2048
  http2:
    enabled: true

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s