Java System.getProperties()方法

Java System.getProperties()方法

System.getProperty()

ehcache的配置文件中默认的临时文件路径是"java.io.tmpdir"
如果需要获得具体的路径可以使用java的方法输出查看

// 查看java.io.tmpdir的路径, 不同的环境路径会不一样
System.getProperty("java.io.tmpdir");

System.getProperties()

如果需要查看其它属性可以使用System.getProperties()查看所有的属性

// 查看System property有哪些
Properties properties = System.getProperties();
System.out.println(properties);

Guess you like

Origin blog.csdn.net/sunday2018/article/details/120436575