Properties props = new Properties();
InputStream config = null;
config = new ClassPathResource("config.properties").getInputStream();
props.load(config);
StaticValues.LOCALIP = props.getProperty("server_Ip");
StaticValues.LOCALPORT = Integer.valueOf(props.getProperty("server_Port"));
StaticValues.simulateAlarSwitch = props.getProperty("simulateAlarSwitch");
StaticValues.simulateAlarInterval = props.getProperty("simulateAlarInterval");
StaticValues.ReGEOWebApiKey = props.getProperty("regeoWebserviceKey");
读取config.properties信息
最新推荐文章于 2021-04-09 22:23:23 发布