Package org.springframework.web.servlet.resource
@NonNullApi
@NonNullFields
package org.springframework.web.servlet.resource
Support classes for serving static resources.
-
ClassDescriptionBase class for
ResourceResolverimplementations.Abstract base class forVersionStrategyimplementations.File name-basedVersionPathStrategy, e.g.A prefix-basedVersionPathStrategy, e.g.AResourceResolverthat resolves resources from aCacheor otherwise delegates to the resolver chain and saves the result in the cache.AResourceTransformerthat checks aCacheto 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.AVersionStrategythat calculates a Hex MD5 hash from the content of the resource and appends it to the file name, e.g.AResourceTransformerimplementation that modifies links in a CSS file to match the public URL paths that should be exposed to clients (e.g.Abstract base class forCssLinkResourceTransformer.LinkParserimplementations.Extract content chunks that represent links.AnHttpRequestHandlerfor serving static files using the Servlet container's "default" Servlet.Resolver that delegates to the chain, and if a resource is found, it then attempts to find an encoded (e.g.AVersionStrategythat relies on a fixed version applied as a request path prefix, e.g.Extended interface for aResourceto be written to an HTTP response.Raised whenResourceHttpRequestHandlercan not find a resource.A simpleResourceResolverthat tries to find a resource under the given locations matching to the request path.HttpRequestHandlerthat serves static resources in an optimized way according to the guidelines of Page Speed, YSlow, etc.A strategy for resolving a request to a server-side resource.A contract for invoking a chain ofResourceResolverswhere each resolver is given a reference to the chain allowing it to delegate when necessary.An abstraction for transforming the content of a resource.A contract for invoking a chain ofResourceTransformerswhere each resolver is given a reference to the chain allowing it to delegate when necessary.A base class for aResourceTransformerwith an optional helper method for resolving public links within a transformed resource.A filter that wraps theHttpServletResponseand overrides itsencodeURLmethod in order to translate internal resource request URLs into public URL paths for external use.A central component to use to obtain the public URL path that clients should use to access a static resource.An interceptor that exposes theResourceUrlProviderinstance it is configured with as a request attribute.An extension ofByteArrayResourcethat aResourceTransformercan use to represent an original resource preserving all other information except the content.A strategy for extracting and embedding a resource version in its URL path.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.An extension ofVersionPathStrategythat adds a method to determine the actual version of aResource.AResourceResolverthat delegates to the chain to locate a resource and then attempts to find a matching versioned resource contained in a WebJar JAR file.