DBProperties.class.getClassLoader() 获取DBProperties 类的类加载器。
API文档有:
DBProperties.class.getClassLoader().getResourceAsStream("jdbc.properties") 读取指定资源的输入流 ,返回InputStream对象。
properties.load(is);//从输入流中读取属性列表
DBProperties.class.getClassLoader() 获取DBProperties 类的类加载器。
API文档有:
DBProperties.class.getClassLoader().getResourceAsStream("jdbc.properties") 读取指定资源的输入流 ,返回InputStream对象。
properties.load(is);//从输入流中读取属性列表