support env

This commit is contained in:
Looly
2019-10-27 07:55:12 +08:00
parent 9dabb0fd9f
commit a965845dcc
3 changed files with 155 additions and 87 deletions

View File

@@ -220,6 +220,11 @@ public class SettingLoader {
if (null == varValue) {
varValue = System.getProperty(key);
}
// 环境变量中查找
if (null == varValue) {
varValue = System.getenv(key);
}
if (null != varValue) {
// 替换标识
value = value.replace(var, varValue);