Commit 1668fa13 authored by Jared Tan's avatar Jared Tan Committed by Jason Song

add APP_ID env. (#2067)

support setting app id from OS environment variable APP_ID
parent 553d7814
...@@ -86,7 +86,15 @@ public class DefaultApplicationProvider implements ApplicationProvider { ...@@ -86,7 +86,15 @@ public class DefaultApplicationProvider implements ApplicationProvider {
return; return;
} }
// 2. Try to get app id from app.properties. //2. Try to get app id from OS environment variable
m_appId = System.getenv("APP_ID");
if (!Utils.isBlank(m_appId)) {
m_appId = m_appId.trim();
logger.info("App ID is set to {} by APP_ID property from OS environment variable", m_appId);
return;
}
// 3. Try to get app id from app.properties.
m_appId = m_appProperties.getProperty("app.id"); m_appId = m_appProperties.getProperty("app.id");
if (!Utils.isBlank(m_appId)) { if (!Utils.isBlank(m_appId)) {
m_appId = m_appId.trim(); m_appId = m_appId.trim();
......
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