From cf88508e1d61b24a8f0802d982369dec6ff8b0d8 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 12 May 2017 17:25:35 +0200 Subject: [PATCH] Avoid exposing `spring.resources.favicon-locations` as a property Closes gh-9214 --- .../boot/autoconfigure/web/ResourceProperties.java | 2 +- .../boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java index 421245ce2b..ba79069daa 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java @@ -117,7 +117,7 @@ public class ResourceProperties implements ResourceLoaderAware { return result; } - public List getFaviconLocations() { + public List resolveFaviconLocations() { List locations = new ArrayList<>(this.staticLocations.length + 1); if (this.resourceLoader != null) { for (String location : this.staticLocations) { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java index 340ef81751..9292876573 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java @@ -351,7 +351,7 @@ public class WebMvcAutoConfiguration { public ResourceHttpRequestHandler faviconRequestHandler() { ResourceHttpRequestHandler requestHandler = new ResourceHttpRequestHandler(); requestHandler - .setLocations(this.resourceProperties.getFaviconLocations()); + .setLocations(this.resourceProperties.resolveFaviconLocations()); return requestHandler; }