public abstract class AbstractResourceResolver extends Object implements ResourceResolver
ResourceResolver providing consistent logging.| Constructor and Description |
|---|
AbstractResourceResolver() |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Resource> |
resolveResource(ServerWebExchange exchange,
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 reactor.core.publisher.Mono<Resource> |
resolveResourceInternal(ServerWebExchange exchange,
String requestPath,
List<? extends Resource> locations,
ResourceResolverChain chain) |
reactor.core.publisher.Mono<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 reactor.core.publisher.Mono<String> |
resolveUrlPathInternal(String resourceUrlPath,
List<? extends Resource> locations,
ResourceResolverChain chain) |
protected final Log logger
public reactor.core.publisher.Mono<Resource> resolveResource(@Nullable ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
ResourceResolverResource that
exists under one of the given resource locations.resolveResource in interface ResourceResolverexchange - the current exchangerequestPath - the portion of the request path to use. This is
expected to be the encoded path, i.e. PathContainer.value().locations - the locations to search in when looking up resourceschain - the chain of remaining resolvers to delegate toMono if unresolvedpublic reactor.core.publisher.Mono<String> resolveUrlPath(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
ResourceResolverThis is useful when rendering URL links to clients.
resolveUrlPath in interface ResourceResolverresourceUrlPath - the "internal" resource path to resolve a path for
public use. This is expected to be the encoded path.locations - the locations to search in when looking up resourceschain - the chain of resolvers to delegate toMono if unresolvedprotected abstract reactor.core.publisher.Mono<Resource> resolveResourceInternal(@Nullable ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected abstract reactor.core.publisher.Mono<String> resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)