Class Compression
java.lang.Object
org.springframework.boot.web.server.Compression
Simple server-independent abstraction for compression configuration.
- Since:
- 2.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Return whether response compression is enabled.String[]
String[]
Return the MIME types that should be compressed.org.springframework.util.unit.DataSize
Return the minimum "Content-Length" value that is required for compression to be performed.void
setEnabled
(boolean enabled) void
setExcludedUserAgents
(String[] excludedUserAgents) void
setMimeTypes
(String[] mimeTypes) void
setMinResponseSize
(org.springframework.util.unit.DataSize minSize)
-
Constructor Details
-
Compression
public Compression()
-
-
Method Details
-
getEnabled
public boolean getEnabled()Return whether response compression is enabled.- Returns:
true
if response compression is enabled
-
setEnabled
public void setEnabled(boolean enabled) -
getMimeTypes
Return the MIME types that should be compressed.- Returns:
- the MIME types that should be compressed
-
setMimeTypes
-
getExcludedUserAgents
-
setExcludedUserAgents
-
getMinResponseSize
public 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
-
setMinResponseSize
public void setMinResponseSize(org.springframework.util.unit.DataSize minSize)
-