org.springframework.boot.web.server

Class Compression



  • public class Compression
    extends Object
    Simple server-independent abstraction for compression configuration.
    Since:
    2.0.0
    Author:
    Ivan Sopov, Andy Wilkinson, Stephane Nicoll
    • Constructor Detail

      • Compression

        public Compression()
    • Method Detail

      • getEnabled

        public boolean getEnabled()
        Return whether response compression is enabled.
        Returns:
        true if response compression is enabled
      • setEnabled

        public void setEnabled(boolean enabled)
      • getMimeTypes

        public String[] getMimeTypes()
        Return the MIME types that should be compressed.
        Returns:
        the MIME types that should be compressed
      • setMimeTypes

        public void setMimeTypes(String[] mimeTypes)
      • getExcludedUserAgents

        public String[] getExcludedUserAgents()
        Return the user agents for which responses should not be compressed.
        Returns:
        the user agents for which responses should not be compressed.
      • setExcludedUserAgents

        public void setExcludedUserAgents(String[] excludedUserAgents)
      • getMinResponseSize

        public int getMinResponseSize()
        Return the minimum "Content-Length" value that is required for compression to be performed.
        Returns:
        the minimum content size in bytes that is required for compression
      • setMinResponseSize

        public void setMinResponseSize(int minSize)

Copyright © 2019 Pivotal Software, Inc.. All rights reserved.