Polishing

This commit is contained in:
Juergen Hoeller
2016-05-06 12:03:10 +02:00
parent 42d32ba396
commit 5682950289
4 changed files with 27 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
package org.springframework.web.servlet.resource;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.webjars.MultipleMatchesException;
@@ -50,8 +49,10 @@ public class WebJarsResourceResolver extends AbstractResourceResolver {
private final static int WEBJARS_LOCATION_LENGTH = WEBJARS_LOCATION.length();
private final WebJarAssetLocator webJarAssetLocator;
/**
* Create a {@code WebJarsResourceResolver} with a default {@code WebJarAssetLocator} instance.
*/
@@ -62,12 +63,13 @@ public class WebJarsResourceResolver extends AbstractResourceResolver {
/**
* Create a {@code WebJarsResourceResolver} with a custom {@code WebJarAssetLocator} instance,
* e.g. with a custom index.
* @since 4.3.0
* @since 4.3
*/
public WebJarsResourceResolver(WebJarAssetLocator webJarAssetLocator) {
this.webJarAssetLocator = webJarAssetLocator;
}
@Override
protected Resource resolveResourceInternal(HttpServletRequest request, String requestPath,
List<? extends Resource> locations, ResourceResolverChain chain) {