文章目录 0.问题描述 1.解决方法 2.总结 0.问题描述 通过下面的代码获得配置文件的路径,并传给FileReader,发现找不到系统路径 String path=Thread.currentThread().getContextClassLoader().getResource("jdbc.properties").getPath();