public class GzipResourceResolver extends AbstractResourceResolver
ResourceResolver
that delegates to the chain to locate a resource
and then attempts to find a variation with the ".gz" extension.
The resolver gets involved only if the "Accept-Encoding" request header contains the value "gzip" indicating the client accepts gzipped responses.
Modifier and Type | Class and Description |
---|---|
private static class |
GzipResourceResolver.GzippedResource |
logger
Constructor and Description |
---|
GzipResourceResolver() |
Modifier and Type | Method and Description |
---|---|
private boolean |
isGzipAccepted(HttpServletRequest request) |
protected Resource |
resolveResourceInternal(HttpServletRequest request,
java.lang.String requestPath,
java.util.List<? extends Resource> locations,
ResourceResolverChain chain) |
protected java.lang.String |
resolveUrlPathInternal(java.lang.String resourceUrlPath,
java.util.List<? extends Resource> locations,
ResourceResolverChain chain) |
resolveResource, resolveUrlPath
protected Resource resolveResourceInternal(HttpServletRequest request, java.lang.String requestPath, java.util.List<? extends Resource> locations, ResourceResolverChain chain)
resolveResourceInternal
in class AbstractResourceResolver
private boolean isGzipAccepted(HttpServletRequest request)
protected java.lang.String resolveUrlPathInternal(java.lang.String resourceUrlPath, java.util.List<? extends Resource> locations, ResourceResolverChain chain)
resolveUrlPathInternal
in class AbstractResourceResolver