|
|
@ -473,15 +473,7 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
|
|
|
|
msg.append("Skipped ");
|
|
|
|
msg.append("Skipped ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
msg.append("config file ");
|
|
|
|
msg.append("config file ");
|
|
|
|
String resourceDescription;
|
|
|
|
msg.append(getResourceDescription(location, resource));
|
|
|
|
try {
|
|
|
|
|
|
|
|
resourceDescription = String.format("'%s' (%s)",
|
|
|
|
|
|
|
|
resource.getURI().toASCIIString(), location);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (IOException ex) {
|
|
|
|
|
|
|
|
resourceDescription = String.format("'%s'", location);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
msg.append(resourceDescription);
|
|
|
|
|
|
|
|
if (StringUtils.hasLength(profile)) {
|
|
|
|
if (StringUtils.hasLength(profile)) {
|
|
|
|
msg.append(" for profile ").append(profile);
|
|
|
|
msg.append(" for profile ").append(profile);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -495,6 +487,25 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
|
|
|
|
return propertySource;
|
|
|
|
return propertySource;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @param location
|
|
|
|
|
|
|
|
* @param resource
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
private String getResourceDescription(String location, Resource resource) {
|
|
|
|
|
|
|
|
String resourceDescription = "'" + location + "'";
|
|
|
|
|
|
|
|
if (resource != null) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
resourceDescription = String.format("'%s' (%s)",
|
|
|
|
|
|
|
|
resource.getURI().toASCIIString(), location);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (IOException ex) {
|
|
|
|
|
|
|
|
// Use the location as the description
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return resourceDescription;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void handleProfileProperties(PropertySource<?> propertySource) {
|
|
|
|
private void handleProfileProperties(PropertySource<?> propertySource) {
|
|
|
|
Set<String> activeProfiles = getProfilesForValue(
|
|
|
|
Set<String> activeProfiles = getProfilesForValue(
|
|
|
|
propertySource.getProperty(ACTIVE_PROFILES_PROPERTY));
|
|
|
|
propertySource.getProperty(ACTIVE_PROFILES_PROPERTY));
|
|
|
|