org.springframework.web.reactive.resource

Class AbstractResourceResolver

  • java.lang.Object
    • org.springframework.web.reactive.resource.AbstractResourceResolver
    • Field Detail

      • logger

        protected final Log logger
    • Constructor Detail

      • AbstractResourceResolver

        public AbstractResourceResolver()
    • Method Detail

      • resolveResource

        public reactor.core.publisher.Mono<Resource> resolveResource(@Nullable
                                                                     ServerWebExchange exchange,
                                                                     java.lang.String requestPath,
                                                                     java.util.List<? extends 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
        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<java.lang.String> resolveUrlPath(java.lang.String resourceUrlPath,
                                                                            java.util.List<? extends 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
        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
      • resolveUrlPathInternal

        protected abstract reactor.core.publisher.Mono<java.lang.String> resolveUrlPathInternal(java.lang.String resourceUrlPath,
                                                                                                java.util.List<? extends Resource> locations,
                                                                                                ResourceResolverChain chain)