From static to instance-based PathContainer#subPath

This commit is contained in:
Rossen Stoyanchev
2017-07-10 19:06:12 +02:00
parent 9f7d57f933
commit 2f17c5f3b6
5 changed files with 41 additions and 35 deletions

View File

@@ -215,7 +215,7 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
.map(entry -> {
PathContainer path = entry.getKey().extractPathWithinPattern(lookupPath);
int endIndex = lookupPath.elements().size() - path.elements().size();
PathContainer mapping = PathContainer.subPath(lookupPath, 0, endIndex);
PathContainer mapping = lookupPath.subPath(0, endIndex);
if (logger.isTraceEnabled()) {
logger.trace("Invoking ResourceResolverChain for URL pattern " +
"\"" + entry.getKey() + "\"");