org.springframework.web.reactive.resource

## Class AbstractResourceResolver

- java.lang.Object
- - org.springframework.web.reactive.resource.AbstractResourceResolver

All Implemented Interfaces:
  ResourceResolver

Direct Known Subclasses:
  CachingResourceResolver, EncodedResourceResolver, GzipResourceResolver, PathResourceResolver, VersionResourceResolver, WebJarsResourceResolver

    public abstract class AbstractResourceResolver
    extends Object
    implements ResourceResolver

Base `ResourceResolver` providing consistent logging.

Since:
  5.0
Author:
  Rossen Stoyanchev

### Field Summary

Fields
`protected Log` `logger`

### Constructor Summary

Constructors
Constructor and Description
`AbstractResourceResolver()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`reactor.core.publisher.Mono<org.springframework.core.io.Resource>` `resolveResource(org.springframework.web.server.ServerWebExchange exchange, String requestPath, List<? extends org.springframework.core.io.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<org.springframework.core.io.Resource>` `resolveResourceInternal(org.springframework.web.server.ServerWebExchange exchange, String requestPath, List<? extends org.springframework.core.io.Resource> locations, ResourceResolverChain chain)`
`reactor.core.publisher.Mono<String>` `resolveUrlPath(String resourceUrlPath, List<? extends org.springframework.core.io.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 org.springframework.core.io.Resource> locations, ResourceResolverChain chain)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### logger

    protected final Log logger

### Constructor Detail

#### AbstractResourceResolver

    public AbstractResourceResolver()

### Method Detail

#### resolveResource

    public reactor.core.publisher.Mono<org.springframework.core.io.Resource> resolveResource(@Nullable
                                                                                             org.springframework.web.server.ServerWebExchange exchange,
                                                                                             String requestPath,
                                                                                             List<? extends org.springframework.core.io.Resource> locations,
                                                                                             ResourceResolverChain chain)

Description copied from interface: `ResourceResolver`
Resolve the supplied request and request path to a `Resource` that exists under one of the given resource locations.

Specified by:
  `resolveResource` in 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 `Mono` if unresolved

#### resolveUrlPath

    public reactor.core.publisher.Mono<String> resolveUrlPath(String resourceUrlPath,
                                                              List<? extends org.springframework.core.io.Resource> locations,
                                                              ResourceResolverChain chain)

Description copied from interface: `ResourceResolver`
Resolve 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:
  `resolveUrlPath` in 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 `Mono` if unresolved

#### resolveResourceInternal

    protected abstract reactor.core.publisher.Mono<org.springframework.core.io.Resource> resolveResourceInternal(@Nullable
                                                                                                                 org.springframework.web.server.ServerWebExchange exchange,
                                                                                                                 String requestPath,
                                                                                                                 List<? extends org.springframework.core.io.Resource> locations,
                                                                                                                 ResourceResolverChain chain)

#### resolveUrlPathInternal

    protected abstract reactor.core.publisher.Mono<String> resolveUrlPathInternal(String resourceUrlPath,
                                                                                  List<? extends org.springframework.core.io.Resource> locations,
                                                                                  ResourceResolverChain chain)