JAVA-19115 Create new core-java-properties sub module under core-java-modules (#13669)

* JAVA-19115 Create new core-java-properties sub module under core-java-modules
This commit is contained in:
anuragkumawat
2023-04-12 17:17:52 +05:45
committed by GitHub
parent ae3429db29
commit cf5d158622
13 changed files with 30 additions and 3 deletions
@@ -1,19 +0,0 @@
package com.baeldung.util;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class PropertiesLoader {
public static Properties loadProperties(String resourceFileName) throws IOException {
Properties configuration = new Properties();
InputStream inputStream = PropertiesLoader.class
.getClassLoader()
.getResourceAsStream(resourceFileName);
configuration.load(inputStream);
inputStream.close();
return configuration;
}
}