类 Compression
java.lang.Object
org.springframework.boot.web.server.Compression
Simple server-independent abstraction for compression configuration.
- 从以下版本开始:
- 2.0.0
- 作者:
- Ivan Sopov, Andy Wilkinson, Stephane Nicoll
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明boolean
Return whether response compression is enabled.String[]
String[]
Return the MIME types that should be compressed.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
(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
Return the MIME types that should be compressed.- 返回:
- the MIME types that should be compressed
-
setMimeTypes
-
getExcludedUserAgents
-
setExcludedUserAgents
-
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
-