${key} 中key的值來至於系統配置信息java
Properties properties = System.getProperties(); @SuppressWarnings("unchecked") Enumeration<String> keys = (Enumeration<String>) properties.propertyNames(); while(keys.hasMoreElements()){ String key = keys.nextElement(); String value = properties.getProperty(key); System.out.println(); System.out.println(key + " = " + value); System.out.println(); }
上面代碼能夠遍歷出全部系統配置信息。code
本身寫着玩get