程序包 org.springframework.web.servlet.resource
Support classes for serving static resources.
接口概要 接口 说明 CssLinkResourceTransformer.CssLinkParser EncodedResource Interface for a resource descriptor that describes the encoding applied to the entire resource content.ResourceResolver A strategy for resolving a request to a server-side resource.ResourceResolverChain A contract for invoking a chain ofResourceResolver
s where each resolver is given a reference to the chain allowing it to delegate when necessary.ResourceTransformer An abstraction for transforming the content of a resource.ResourceTransformerChain A contract for invoking a chain ofResourceTransformer
s where each resolver is given a reference to the chain allowing it to delegate when necessary.VersionedResource Interface for a resource descriptor that describes its version with a version string that can be derived from its content and/or metadata.VersionPathStrategy A strategy for extracting and embedding a resource version in its URL path.VersionStrategy An extension ofVersionPathStrategy
that adds a method to determine the actual version of aResource
.类概要 类 说明 AbstractResourceResolver Base class forResourceResolver
implementations.AbstractVersionStrategy Abstract base class forVersionStrategy
implementations.AbstractVersionStrategy.FileNameVersionPathStrategy File name-basedVersionPathStrategy
, e.g.AbstractVersionStrategy.PrefixVersionPathStrategy A prefix-basedVersionPathStrategy
, e.g.AppCacheManifestTransformer AResourceTransformer
implementation that helps handling resources within HTML5 AppCache manifests for HTML5 offline applications.CachingResourceResolver AResourceResolver
that resolves resources from aCache
or otherwise delegates to the resolver chain and saves the result in the cache.CachingResourceTransformer AResourceTransformer
that checks aCache
to see if a previously transformed resource exists in the cache and returns it if found, and otherwise delegates to the resolver chain and saves the result in the cache.ContentVersionStrategy AVersionStrategy
that calculates an Hex MD5 hashes from the content of the resource and appends it to the file name, e.g.CssLinkResourceTransformer AResourceTransformer
implementation that modifies links in a CSS file to match the public URL paths that should be exposed to clients (e.g.CssLinkResourceTransformer.AbstractCssLinkParser DefaultServletHttpRequestHandler AnHttpRequestHandler
for serving static files using the Servlet container's "default" Servlet.FixedVersionStrategy AVersionStrategy
that relies on a fixed version applied as a request path prefix, e.g. reduced SHA, version name, release date, etc.GzipResourceResolver AResourceResolver
that delegates to the chain to locate a resource and then attempts to find a variation with the ".gz" extension.PathResourceResolver A simpleResourceResolver
that tries to find a resource under the given locations matching to the request path.ResourceHttpRequestHandler HttpRequestHandler
that serves static resources in an optimized way according to the guidelines of Page Speed, YSlow, etc.ResourceTransformerSupport A base class for aResourceTransformer
with an optional helper method for resolving public links within a transformed resource.ResourceUrlEncodingFilter A filter that wraps theHttpServletResponse
and overrides itsencodeURL
method in order to translate internal resource request URLs into public URL paths for external use.ResourceUrlProvider A central component to use to obtain the public URL path that clients should use to access a static resource.ResourceUrlProviderExposingInterceptor An interceptor that exposes theResourceUrlProvider
instance it is configured with as a request attribute.TransformedResource An extension ofByteArrayResource
that aResourceTransformer
can use to represent an original resource preserving all other information except the content.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.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.