|
|
@ -62,6 +62,7 @@ import org.springframework.core.env.PropertySource;
|
|
|
|
import org.springframework.core.io.DefaultResourceLoader;
|
|
|
|
import org.springframework.core.io.DefaultResourceLoader;
|
|
|
|
import org.springframework.core.io.Resource;
|
|
|
|
import org.springframework.core.io.Resource;
|
|
|
|
import org.springframework.core.io.ResourceLoader;
|
|
|
|
import org.springframework.core.io.ResourceLoader;
|
|
|
|
|
|
|
|
import org.springframework.core.io.support.ResourcePatternResolver;
|
|
|
|
import org.springframework.core.io.support.SpringFactoriesLoader;
|
|
|
|
import org.springframework.core.io.support.SpringFactoriesLoader;
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
@ -618,6 +619,8 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
|
|
|
|
for (String path : asResolvedSet(this.environment.getProperty(propertyName), null)) {
|
|
|
|
for (String path : asResolvedSet(this.environment.getProperty(propertyName), null)) {
|
|
|
|
if (!path.contains("$")) {
|
|
|
|
if (!path.contains("$")) {
|
|
|
|
path = StringUtils.cleanPath(path);
|
|
|
|
path = StringUtils.cleanPath(path);
|
|
|
|
|
|
|
|
Assert.state(!path.startsWith(ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX),
|
|
|
|
|
|
|
|
"Classpath wildard patterns cannot be used as a search location");
|
|
|
|
if (!ResourceUtils.isUrl(path)) {
|
|
|
|
if (!ResourceUtils.isUrl(path)) {
|
|
|
|
path = ResourceUtils.FILE_URL_PREFIX + path;
|
|
|
|
path = ResourceUtils.FILE_URL_PREFIX + path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|