首先在folder文件中添加配置文件,文件的扩展名为 .properties
同时Properties类对象有一个方法 .load();可以把配置文件load到内存中,例: Properties props = new Properties(); props.load(PropertyMgr.class.getClassLoader().getResourceAsStream("config/tank.properties")); |
配置文件
最新推荐文章于 2024-06-18 14:06:56 发布