${key} 中key的值来至于系统配置信息
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();
}
上面代码可以遍历出所有系统配置信息。
自己写着玩