public interface ResourceResolver
Provides mechanisms for resolving an incoming request to an actual
Resource
and for obtaining the
public URL path that clients should use when requesting the resource.
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Resource> |
resolveResource(ServerWebExchange exchange,
java.lang.String requestPath,
java.util.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. |
reactor.core.publisher.Mono<java.lang.String> |
resolveUrlPath(java.lang.String resourcePath,
java.util.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.
|
reactor.core.publisher.Mono<Resource> resolveResource(@Nullable ServerWebExchange exchange, java.lang.String requestPath, java.util.List<? extends Resource> locations, ResourceResolverChain chain)
Resource
that
exists under one of the given resource locations.exchange
- the current exchangerequestPath
- the portion of the request path to uselocations
- the locations to search in when looking up resourceschain
- the chain of remaining resolvers to delegate toMono
if unresolvedreactor.core.publisher.Mono<java.lang.String> resolveUrlPath(java.lang.String resourcePath, java.util.List<? extends Resource> locations, ResourceResolverChain chain)
This is useful when rendering URL links to clients.
resourcePath
- the internal resource pathlocations
- the locations to search in when looking up resourceschain
- the chain of resolvers to delegate toMono
if unresolved