From b6996fbc05d4102b2da9f78796821fa78b5288e5 Mon Sep 17 00:00:00 2001 From: Ali Dehghani Date: Sat, 25 Apr 2020 22:55:00 +0430 Subject: [PATCH] Added Trailing slash to Fix the Relative Path Bug --- .../java/com/baeldung/favicon/config/FaviconConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-modules/spring-boot-basic-customization/src/main/java/com/baeldung/favicon/config/FaviconConfiguration.java b/spring-boot-modules/spring-boot-basic-customization/src/main/java/com/baeldung/favicon/config/FaviconConfiguration.java index d1809199d6..f2a173caf3 100644 --- a/spring-boot-modules/spring-boot-basic-customization/src/main/java/com/baeldung/favicon/config/FaviconConfiguration.java +++ b/spring-boot-modules/spring-boot-basic-customization/src/main/java/com/baeldung/favicon/config/FaviconConfiguration.java @@ -28,7 +28,7 @@ public class FaviconConfiguration { @Bean protected ResourceHttpRequestHandler faviconRequestHandler() { ResourceHttpRequestHandler requestHandler = new ResourceHttpRequestHandler(); - ClassPathResource classPathResource = new ClassPathResource("com/baeldung/images"); + ClassPathResource classPathResource = new ClassPathResource("com/baeldung/images/"); List locations = Arrays.asList(classPathResource); requestHandler.setLocations(locations); return requestHandler;