Properties properties = new Properties();
properties.load(this.getClass().getResourceAsStream("/dbConnectionConfig.properties"));
注意!路径是带“/”的
原因:输出目录下的配置文件是在类根路径下的
Properties properties = new Properties();
properties.load(this.getClass().getResourceAsStream("/dbConnectionConfig.properties"));
注意!路径是带“/”的
原因:输出目录下的配置文件是在类根路径下的