JAVA代码片段

来源:互联网 发布:软件兼容性 编辑:程序博客网 时间:2024/04/29 21:15

1.读取配置文件

Properties prop = new Properties();//创建properties对象
InputStream is = JdbcUtils.class.getClass().getClassLoader().getResourceAsStream("config.properties");//读取配置文件
prop.load(is);//加载配置文件

原创粉丝点击