I created a simple maven project. I placed one properties file and one xlsx file in src/main/resources
folder. How can i load the properties/excel files? I tried as below.
InputStream inputStream = null;
try {
inputStream = new FileInputStream("/app.properties");
props.load(inputStream);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
It throws exception saying that properties file could not be located. Am i doing anything wrong?
Thanks!