在shell腳本中導入環境變量,如export UNSENT_MESSAGES=/log/unsent_messages.txt
在config.properties中,unsentFile=UNSENT_MESSAGES
在java文件中獲取變量
property.load(new FileInputStream("config.properties"));
String unsentMessageFile = property.getProperty("unsentFile");
String filePath = System.getenv(unsentMessageFile);
