类 Compression
- java.lang.Object
- org.springframework.boot.web.server.Compression
public class Compression extends Object
Simple server-independent abstraction for compression configuration.- 从以下版本开始:
- 2.0.0
构造器概要
构造器 构造器 说明 Compression()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
getEnabled()
Return whether response compression is enabled.String[]
getExcludedUserAgents()
String[]
getMimeTypes()
Return the MIME types that should be compressed.org.springframework.util.unit.DataSize
getMinResponseSize()
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)
构造器详细资料
Compression
public Compression()
方法详细资料
getEnabled
public boolean getEnabled()
Return whether response compression is enabled.- 返回:
true
if response compression is enabled
setEnabled
public void setEnabled(boolean enabled)
getMimeTypes
public String[] getMimeTypes()
Return the MIME types that should be compressed.- 返回:
- the MIME types that should be compressed
setMimeTypes
public void setMimeTypes(String[] mimeTypes)
getExcludedUserAgents
public String[] getExcludedUserAgents()
setExcludedUserAgents
public void setExcludedUserAgents(String[] excludedUserAgents)
getMinResponseSize
public org.springframework.util.unit.DataSize getMinResponseSize()
Return the minimum "Content-Length" value that is required for compression to be performed.- 返回:
- the minimum content size in bytes that is required for compression
setMinResponseSize
public void setMinResponseSize(org.springframework.util.unit.DataSize minSize)