This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/master by this push:
new c9cf41a [SYNCOPE-1553] Ensure dynamic properties are loaded at last,
to avoid pulling unwanted default values
c9cf41a is described below
commit c9cf41a3965b8572c577b9c02348bdb2b9d55a40
Author: Francesco Chicchiriccò <[email protected]>
AuthorDate: Wed Jul 1 13:32:12 2020 +0200
[SYNCOPE-1553] Ensure dynamic properties are loaded at last, to avoid
pulling unwanted default values
---
.../syncope/wa/bootstrap/SyncopeWAPropertySourceLocator.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/SyncopeWAPropertySourceLocator.java
b/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/SyncopeWAPropertySourceLocator.java
index 0600ee7..125db91 100644
---
a/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/SyncopeWAPropertySourceLocator.java
+++
b/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/SyncopeWAPropertySourceLocator.java
@@ -53,6 +53,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.bootstrap.config.PropertySourceLocator;
import org.springframework.core.annotation.Order;
+import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.Environment;
import org.springframework.core.env.MapPropertySource;
import org.springframework.core.env.PropertySource;
@@ -330,8 +331,13 @@ public class SyncopeWAPropertySourceLocator implements
PropertySourceLocator {
mapU2fAuthModuleConf(casProperties, authConf);
}
});
+
Map<String, Object> properties =
CasCoreConfigurationUtils.asMap(casProperties.withHolder());
LOG.debug("Collected WA properties: {}", properties);
- return new MapPropertySource(getClass().getName(), properties);
+
+ ConfigurableEnvironment.class.cast(environment).getPropertySources().
+ addLast(new MapPropertySource(getClass().getName(),
properties));
+
+ return null;
}
}