接口 ResourceResolvingChain

所有已知实现类:
DefaultResourceResolvingChain

public interface ResourceResolvingChain
A contract for invoking a chain of ResourceResolvers where each resolver is given a reference to the chain allowing it to delegate when necessary.
从以下版本开始:
4.0
作者:
Jeremy Grelle, Rossen Stoyanchev, Sam Brannen, Harry Yang
  • 方法概要

    修饰符和类型
    方法
    说明
    cn.taketoday.core.io.Resource
    resolveResource(RequestContext request, String requestPath, List<? extends cn.taketoday.core.io.Resource> locations)
    Resolve the supplied request and request path to a Resource that exists under one of the given resource locations.
    resolveUrlPath(String resourcePath, List<? extends cn.taketoday.core.io.Resource> locations)
    Resolve the externally facing public URL path for clients to use to access the resource that is located at the given internal resource path.
  • 方法详细资料

    • resolveResource

      @Nullable cn.taketoday.core.io.Resource resolveResource(@Nullable RequestContext request, String requestPath, List<? extends cn.taketoday.core.io.Resource> locations)
      Resolve the supplied request and request path to a Resource that exists under one of the given resource locations.
      参数:
      request - the current request
      requestPath - the portion of the request path to use
      locations - the locations to search in when looking up resources
      返回:
      the resolved resource, or null if unresolved
    • resolveUrlPath

      @Nullable String resolveUrlPath(String resourcePath, List<? extends cn.taketoday.core.io.Resource> locations)
      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.

      参数:
      resourcePath - the internal resource path
      locations - the locations to search in when looking up resources
      返回:
      the resolved public URL path, or null if unresolved