I am trying to load properties file. Here is my structure
Now i am trying to lo
Please put your property file in /src/main/resources folder and load from ClassLoader. It will be fix.
like
/src/main/resources/test.properties
Properties properties = null;
try {
properties = new Properties();
InputStream resourceAsStream = Test.class.getClassLoader().getResourceAsStream("test.properties");
if (resourceAsStream != null) {
properties.load(resourceAsStream);
}
} catch (IOException e) {
e.printStackTrace();
}