Skip to content

Commit 3fef748

Browse files
committed
add resource domain to settings
1 parent 5fd427b commit 3fef748

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

core/src/main/java/com/flowci/core/common/domain/Settings.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ public static class Action {
3232

3333
private String serverUrl;
3434

35+
/**
36+
* Indicate load resource(cn) from where
37+
*/
38+
private String source;
39+
3540
public Settings() {
3641
setId(DefaultId);
3742
}

core/src/main/java/com/flowci/core/common/service/SettingServiceImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.flowci.core.common.service;
22

3+
import com.flowci.core.common.config.AppProperties;
34
import com.flowci.core.common.dao.SettingsDao;
45
import com.flowci.core.common.domain.Settings;
56
import com.flowci.core.common.domain.Variables;
@@ -18,6 +19,9 @@ public class SettingServiceImpl implements SettingService {
1819
@Autowired
1920
private Environment environment;
2021

22+
@Autowired
23+
private AppProperties appProperties;
24+
2125
@Autowired
2226
private ServerProperties serverProperties;
2327

@@ -49,6 +53,7 @@ public void setDefaultValue() {
4953
}
5054

5155
s.setServerUrl(serverUrl);
56+
s.setSource(appProperties.getResourceDomain());
5257
settingsDao.save(s);
5358
});
5459
}

0 commit comments

Comments
 (0)