From 41da04d3865d611ece65e6a236a3f3b3876e27f9 Mon Sep 17 00:00:00 2001 From: Ruben Dijkstra Date: Thu, 3 Mar 2016 18:01:09 +0100 Subject: [PATCH] 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 --- .../web/servlet/resource/WebJarsResourceResolver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/WebJarsResourceResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/WebJarsResourceResolver.java index 8d08bbd73b..395cad1f3e 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/WebJarsResourceResolver.java +++ b/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();