Class Compression
java.lang.Object
org.springframework.boot.web.server.Compression
Simple server-independent abstraction for compression configuration.
- Since:
- 2.0.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturn whether response compression is enabled.String[]String[]Return the MIME types that should be compressed.org.springframework.util.unit.DataSizeReturn the minimum "Content-Length" value that is required for compression to be performed.voidsetEnabled(boolean enabled) voidsetExcludedUserAgents(String[] excludedUserAgents) voidsetMimeTypes(String[] mimeTypes) voidsetMinResponseSize(org.springframework.util.unit.DataSize minSize) 
- 
Constructor Details- 
Compressionpublic Compression()
 
- 
- 
Method Details- 
getEnabledpublic boolean getEnabled()Return whether response compression is enabled.- Returns:
- trueif response compression is enabled
 
- 
setEnabledpublic void setEnabled(boolean enabled) 
- 
getMimeTypesReturn the MIME types that should be compressed.- Returns:
- the MIME types that should be compressed
 
- 
setMimeTypes
- 
getExcludedUserAgents
- 
setExcludedUserAgents
- 
getMinResponseSizepublic org.springframework.util.unit.DataSize 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
 
- 
setMinResponseSizepublic void setMinResponseSize(org.springframework.util.unit.DataSize minSize) 
 
-