JDBC配置properties文件报错:java.lang.NullPointerException: inStream parameter is null
当配置properties文件时(在src的根目录),如下
加载时报错:java.lang.NullPointerException: inStream parameter is null。
但如果加载时改为 类名.class.getResourceAsStream(); 即
pp.load(DButil.class.getResourceAsStream("/config.properties"));
编译成功。在网上查了很多资料,仍未找到原因。