public abstract class AbstractResourceResolver extends Object implements ResourceResolver
ResourceResolver
implementations. Provides consistent logging.Constructor and Description |
---|
AbstractResourceResolver() |
Modifier and Type | Method and Description |
---|---|
Resource |
resolveResource(HttpServletRequest request,
String requestPath,
List<? extends Resource> locations,
ResourceResolverChain chain)
Resolve the supplied request and request path to a
Resource that
exists under one of the given resource locations. |
protected abstract Resource |
resolveResourceInternal(HttpServletRequest request,
String requestPath,
List<? extends Resource> locations,
ResourceResolverChain chain) |
String |
resolveUrlPath(String resourceUrlPath,
List<? extends Resource> locations,
ResourceResolverChain chain)
Resolve the externally facing public URL path for clients to use
to access the resource that is located at the given internal
resource path.
|
protected abstract String |
resolveUrlPathInternal(String resourceUrlPath,
List<? extends Resource> locations,
ResourceResolverChain chain) |
protected final Log logger
@Nullable public Resource resolveResource(@Nullable HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
ResourceResolver
Resource
that
exists under one of the given resource locations.resolveResource
in interface ResourceResolver
request
- the current request (may not be present in some calls)requestPath
- the portion of the request path to uselocations
- the locations to search in when looking up resourceschain
- the chain of remaining resolvers to delegate tonull
if unresolved@Nullable public String resolveUrlPath(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
ResourceResolver
This is useful when rendering URL links to clients.
resolveUrlPath
in interface ResourceResolver
resourceUrlPath
- the internal resource pathlocations
- the locations to search in when looking up resourceschain
- the chain of resolvers to delegate tonull
if unresolved@Nullable protected abstract Resource resolveResourceInternal(@Nullable HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)