类的使用
org.springframework.web.servlet.resource.AbstractResourceResolver
使用AbstractResourceResolver的程序包 程序包 说明 org.springframework.web.servlet.resource Support classes for serving static resources.org.springframework.web.servlet.resource中AbstractResourceResolver的使用
org.springframework.web.servlet.resource中AbstractResourceResolver的子类 修饰符和类型 类 说明 class
CachingResourceResolver
AResourceResolver
that resolves resources from aCache
or otherwise delegates to the resolver chain and saves the result in the cache.class
EncodedResourceResolver
Resolver that delegates to the chain, and if a resource is found, it then attempts to find an encoded (e.g. gzip, brotli) variant that is acceptable based on the "Accept-Encoding" request header.class
GzipResourceResolver
已过时。as of 5.1, in favor of usingEncodedResourceResolver
class
PathResourceResolver
A simpleResourceResolver
that tries to find a resource under the given locations matching to the request path.class
VersionResourceResolver
Resolves request paths containing a version string that can be used as part of an HTTP caching strategy in which a resource is cached with a date in the distant future (e.g. 1 year) and cached until the version, and therefore the URL, is changed.class
WebJarsResourceResolver
AResourceResolver
that delegates to the chain to locate a resource and then attempts to find a matching versioned resource contained in a WebJar JAR file.