Remove duplicate slash from resolved WebJar locations

This commit updates the WEBJARS_LOCATION in WebJarResourceResolver to
avoid getting duplicate slashes in resolved resources locations such
as `/webjars//bootstrap/3.3.2/js/bootstrap.min.js`.

Issue: SPR-14018
master
Ruben Dijkstra 9 years ago committed by Brian Clozel
parent 9e167045fc
commit 41da04d386
  1. 2
      spring-webmvc/src/main/java/org/springframework/web/servlet/resource/WebJarsResourceResolver.java

@ -45,7 +45,7 @@ import org.springframework.core.io.Resource;
*/
public class WebJarsResourceResolver extends AbstractResourceResolver {
private final static String WEBJARS_LOCATION = "META-INF/resources/webjars";
private final static String WEBJARS_LOCATION = "META-INF/resources/webjars/";
private final static int WEBJARS_LOCATION_LENGTH = WEBJARS_LOCATION.length();

Loading…
Cancel
Save