diff --git a/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java index a96b5b6905e..3ddeb4e7886 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java @@ -391,9 +391,9 @@ public class ConfigFileApplicationListener implements StringBuilder msg = new StringBuilder(); msg.append(propertySource == null ? "Skipped " : "Loaded "); msg.append("config file "); - msg.append("'" + location + "' "); - msg.append(StringUtils.hasLength(profile) ? "for profile " + profile : ""); - msg.append(resource == null || !resource.exists() ? " resource not found" : ""); + msg.append("'").append(location).append("' "); + msg.append(StringUtils.hasLength(profile) ? "for profile " + profile : " "); + msg.append(resource == null || !resource.exists() ? "resource not found" : ""); this.debug.add(msg); return propertySource;