Added Trailing slash to Fix the Relative Path Bug

This commit is contained in:
Ali Dehghani 2020-04-25 22:55:00 +04:30
parent b7588a7a33
commit b6996fbc05
1 changed files with 1 additions and 1 deletions

View File

@ -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<Resource> locations = Arrays.asList(classPathResource);
requestHandler.setLocations(locations);
return requestHandler;