Example usage for org.springframework.web.servlet.resource ResourceResolver resolveUrlPath

List of usage examples for org.springframework.web.servlet.resource ResourceResolver resolveUrlPath

Introduction

In this page you can find the example usage for org.springframework.web.servlet.resource ResourceResolver resolveUrlPath.

Prototype

@Nullable
String resolveUrlPath(String resourcePath, List<? extends Resource> locations, ResourceResolverChain chain);

Source Link

Document

Resolve the externally facing public URL path for clients to use to access the resource that is located at the given internal resource path.

Usage

From source file:org.broadleafcommerce.common.web.resource.BroadleafDefaultResourceResolverChain.java

@Override
public String resolveUrlPath(String resourcePath, List<? extends Resource> locations) {
    ResourceResolver resolver = getNext();
    if (resolver == null) {
        return null;
    }//from  w  w  w.  ja v  a2 s  .  co  m
    try {
        String returnPath = resolver.resolveUrlPath(resourcePath, locations, this);
        if (LOG.isTraceEnabled()) {
            LOG.trace(
                    "The return path for " + resourcePath + " from resolver " + resolver + " is " + returnPath);
        }
        return returnPath;
    } finally {
        this.index--;
    }
}