Commit 41a32fee authored by Jason Song's avatar Jason Song Committed by GitHub

Merge pull request #1291 from nobodyiam/sysenv-name-fix

system variable cannot contain dot
parents bd14b413 2aa5758d
...@@ -75,7 +75,7 @@ public class ConfigServiceLocator { ...@@ -75,7 +75,7 @@ public class ConfigServiceLocator {
String configServices = System.getProperty("apollo.configService"); String configServices = System.getProperty("apollo.configService");
if (Strings.isNullOrEmpty(configServices)) { if (Strings.isNullOrEmpty(configServices)) {
// 2. Get from OS environment variable // 2. Get from OS environment variable
configServices = System.getenv("APOLLO.CONFIGSERVICE"); configServices = System.getenv("APOLLO_CONFIGSERVICE");
} }
if (Strings.isNullOrEmpty(configServices)) { if (Strings.isNullOrEmpty(configServices)) {
// 3. Get from server.properties // 3. Get from server.properties
......
...@@ -222,7 +222,7 @@ public class ConfigUtil { ...@@ -222,7 +222,7 @@ public class ConfigUtil {
String cacheRoot = System.getProperty("apollo.cacheDir"); String cacheRoot = System.getProperty("apollo.cacheDir");
if (Strings.isNullOrEmpty(cacheRoot)) { if (Strings.isNullOrEmpty(cacheRoot)) {
// 2. Get from OS environment variable // 2. Get from OS environment variable
cacheRoot = System.getenv("APOLLO.CACHEDIR"); cacheRoot = System.getenv("APOLLO_CACHEDIR");
} }
if (Strings.isNullOrEmpty(cacheRoot)) { if (Strings.isNullOrEmpty(cacheRoot)) {
// 3. Get from server.properties // 3. Get from server.properties
......
...@@ -85,7 +85,7 @@ public class MetaDomainConsts { ...@@ -85,7 +85,7 @@ public class MetaDomainConsts {
String metaAddress = System.getProperty("apollo.meta"); String metaAddress = System.getProperty("apollo.meta");
if (Strings.isNullOrEmpty(metaAddress)) { if (Strings.isNullOrEmpty(metaAddress)) {
// 2. Get from OS environment variable // 2. Get from OS environment variable
metaAddress = System.getenv("APOLLO.META"); metaAddress = System.getenv("APOLLO_META");
} }
if (Strings.isNullOrEmpty(metaAddress)) { if (Strings.isNullOrEmpty(metaAddress)) {
metaAddress = Foundation.server().getProperty("apollo.meta", null); metaAddress = Foundation.server().getProperty("apollo.meta", null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment