Skip to content

Commit 66af665

Browse files
author
Bytekeeper
committed
Use old config on migration.
1 parent 355f6cf commit 66af665

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/main/java/org/stt/config/ConfigServiceFacade.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public void start() throws Exception {
2222
jsonConfigService.start();
2323
if (jsonConfigService.isNewConfig()) {
2424
yamlConfigService.start();
25+
jsonConfigService.setConfig(yamlConfigService.getConfig());
2526
} else {
2627
skipYaml = true;
2728
}

src/main/java/org/stt/config/JsonConfigService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ public ConfigRoot getConfig() {
4141
return config;
4242
}
4343

44+
public void setConfig(ConfigRoot config) {
45+
this.config = config;
46+
}
47+
4448
@Override
4549
public void start() throws Exception {
4650
boolean mkdirs = sttJson.getParentFile().mkdirs();

0 commit comments

Comments
 (0)