Skip to content

Commit

Permalink
CB-4889 fix runtime conf priority
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-skoblikov committed Jun 26, 2024
1 parent 00cd5e9 commit 0e7f8c8
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,17 @@ protected Map<String, Object> readConfiguration(Path configPath) throws DBExcept

configProps.putAll(readConfigurationFile(configPath));

var mergedOriginalConfigs = WebAppUtils.mergeConfigurations(configProps, originalConfigurationProperties);
this.originalConfigurationProperties.clear();
// saves original configuration file
this.originalConfigurationProperties.putAll(mergedOriginalConfigs);
if (originalConfigurationProperties.isEmpty()) {
originalConfigurationProperties.putAll(configProps);
} else {
var mergedOriginalConfigs = WebAppUtils.mergeConfigurations(
originalConfigurationProperties,
configProps
);
this.originalConfigurationProperties.clear();
// saves original configuration file
this.originalConfigurationProperties.putAll(mergedOriginalConfigs);
}

configProps.putAll(readConfigurationFile(configPath));
patchConfigurationWithProperties(configProps); // patch original properties
Expand Down

0 comments on commit 0e7f8c8

Please sign in to comment.