summaryrefslogtreecommitdiffstats
path: root/dcae-analytics/dcae-analytics-web
diff options
context:
space:
mode:
authorKai <lukai@chinamobile.com>2020-05-09 15:19:14 +0800
committerKai <lukai@chinamobile.com>2020-05-09 15:19:58 +0800
commit13bb744669580623fd779f287ca9ce647d6182b6 (patch)
tree331cfa3e510d1dc94b61ff9756993307d2cb53ff /dcae-analytics/dcae-analytics-web
parentd2ae13a03ef24fc87ae0a38e41da25bc6d1b192b (diff)
Enable TCAgen2 to policy flow
Issue-ID: DCAEGEN2-2198 Signed-off-by: Kai Lu <lukai@chinamobile.com> Change-Id: I35abe1efd996b9ab9b177f9be1733aaf0b6aaa64
Diffstat (limited to 'dcae-analytics/dcae-analytics-web')
-rw-r--r--dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java b/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java
index c41e416..d286d10 100644
--- a/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java
+++ b/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java
@@ -81,6 +81,9 @@ public class ConfigBindingServiceEnvironmentPostProcessor implements Environment
private String configServicePropertiesKey =
ConfigBindingServiceConstants.CONFIG_BINDING_SERVICE_PROPERTIES_KEY;
+ private String springConfigServicePropertiesKey =
+ ConfigBindingServiceConstants.SPRING_CONFIG_BINDING_SERVICE_PROPERTIES_KEY;
+
@Override
public void postProcessEnvironment(final ConfigurableEnvironment environment,
final SpringApplication application) {
@@ -247,13 +250,13 @@ public class ConfigBindingServiceEnvironmentPostProcessor implements Environment
final Set<String> springKeyPrefixes =
ConfigBindingServiceConstants.getSpringReservedPropertiesKeyPrefixes();
final Set<String> springKeys = springKeyPrefixes.stream()
- .map(springKeyPrefix -> configServicePropertiesKey + "." + springKeyPrefix)
+ .map(springKeyPrefix -> springConfigServicePropertiesKey + "." + springKeyPrefix)
.collect(Collectors.toSet());
filterKeyMap = configPropertiesMap.entrySet().stream()
.collect(Collectors.toMap((Map.Entry<String, Object> e) -> springKeys.stream()
.anyMatch(springKey -> e.getKey().startsWith(springKey))
- ? e.getKey().substring(configServicePropertiesKey.toCharArray().length + 1)
+ ? e.getKey().substring(springConfigServicePropertiesKey.toCharArray().length + 1)
: e.getKey(),
Map.Entry::getValue));