类 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
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanReturn 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.voidsetEnabled(boolean enabled) voidsetExcludedUserAgents(String[] excludedUserAgents) voidsetMimeTypes(String[] mimeTypes) voidsetMinResponseSize(DataSize minSize)
-
构造器详细资料
-
Compression
public Compression()
-
-
方法详细资料
-
getEnabled
public boolean getEnabled()Return whether response compression is enabled.- 返回:
trueif 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
-