Class AbstractResourceResolver
java.lang.Object
org.springframework.web.reactive.resource.AbstractResourceResolver
- All Implemented Interfaces:
- ResourceResolver
- Direct Known Subclasses:
- CachingResourceResolver,- EncodedResourceResolver,- PathResourceResolver,- VersionResourceResolver,- WebJarsResourceResolver
Base 
ResourceResolver providing consistent logging.- Since:
- 5.0
- Author:
- Rossen Stoyanchev
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionreactor.core.publisher.Mono<Resource>resolveResource(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain) Resolve the supplied request and request path to aResourcethat 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) 
- 
Field Details- 
logger
 
- 
- 
Constructor Details- 
AbstractResourceResolverpublic AbstractResourceResolver()
 
- 
- 
Method Details- 
resolveResourcepublic reactor.core.publisher.Mono<Resource> resolveResource(@Nullable ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain) Description copied from interface:ResourceResolverResolve the supplied request and request path to aResourcethat exists under one of the given resource locations.- Specified by:
- resolveResourcein interface- ResourceResolver
- Parameters:
- exchange- the current exchange
- requestPath- 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 resources
- chain- the chain of remaining resolvers to delegate to
- Returns:
- the resolved resource or an empty Monoif unresolved
 
- 
resolveUrlPathpublic reactor.core.publisher.Mono<String> resolveUrlPath(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain) Description copied from interface:ResourceResolverResolve the externally facing public URL path for clients to use to access the resource that is located at the given internal resource path.This is useful when rendering URL links to clients. - Specified by:
- resolveUrlPathin interface- ResourceResolver
- Parameters:
- resourceUrlPath- 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 resources
- chain- the chain of resolvers to delegate to
- Returns:
- the resolved public URL path or an empty Monoif unresolved
 
- 
resolveResourceInternalprotected abstract reactor.core.publisher.Mono<Resource> resolveResourceInternal(@Nullable ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain) 
- 
resolveUrlPathInternalprotected abstract reactor.core.publisher.Mono<String> resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain) 
 
-