This commit is contained in:
erabii
2023-07-19 15:10:43 +03:00
committed by Ryan Baxter
parent 6524843765
commit 9b8872bfda
2 changed files with 8 additions and 2 deletions

View File

@@ -99,7 +99,10 @@ public abstract class ConfigMapPropertySourceLocator implements PropertySourceLo
private void addPropertySourcesFromPaths(Environment environment, CompositePropertySource composite) {
Set<String> uniquePaths = new LinkedHashSet<>(properties.paths());
LOG.warn("path support is deprecated and will be removed in a future release. Please use spring.config.import");
if (!uniquePaths.isEmpty()) {
LOG.warn(
"path support is deprecated and will be removed in a future release. Please use spring.config.import");
}
LOG.debug("paths property sources : " + uniquePaths);
uniquePaths.stream().map(Paths::get).filter(p -> {
boolean exists = Files.exists(p);

View File

@@ -112,7 +112,10 @@ public abstract class SecretsPropertySourceLocator implements PropertySourceLoca
protected void putPathConfig(CompositePropertySource composite) {
LOG.warn("path support is deprecated and will be removed in a future release. Please use spring.config.import");
if (!properties.paths().isEmpty()) {
LOG.warn(
"path support is deprecated and will be removed in a future release. Please use spring.config.import");
}
this.properties.paths().stream().map(Paths::get).filter(Files::exists).flatMap(x -> {
try {