1. 添加Auth的环境变量的配置

This commit is contained in:
zhangxin10 2015-12-30 11:08:12 +08:00
parent 2beff89069
commit efae51c5d2
2 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,8 @@ public class Config {
public static String USER_ID = "";
public static String APPLICATION_CODE = "";
public static String AUTH_SYSTEM_ENV_NAME = "SKYWALKING_RUN";
}
public static class BuriedPoint {

View File

@ -21,7 +21,8 @@ public class ConfigInitializer {
Properties properties = new Properties();
properties.load(inputStream);
initNextLevel(properties, Config.class, new ConfigDesc());
AuthDesc.isAuth = true;
AuthDesc.isAuth = Boolean.valueOf(System.getenv(Config.SkyWalking.AUTH_SYSTEM_ENV_NAME));
logger.log(Level.ALL, "skywalking auth check : " + AuthDesc.isAuth);
} catch (IllegalAccessException e) {
logger.log(Level.ALL, "Parsing certification file failed, buried won't work");
} catch (IOException e) {