Java 读取properties 配置文件的几种方式
发布时间:2020-12-15 05:24:45 所属栏目:Java 来源:网络整理
导读:基于ClassLoder读取配置文件 Properties properties = new Properties(); // 使用ClassLoader加载properties配置文件生成对应的输入流 InputStream in = PropertiesMain.class.getClassLoader().getResourceAsStream("config/config.properties"); // 使用pr
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |