I have a java maven project. i have placed a properties file in src/main/resources
folder.
src/main/resources
|
|___properties
|
Read the property file from classpath
Properties prop = new Properties();
try {
//load a properties file from class path, inside static method
prop.load(App.class.getClassLoader().getResourceAsStream("config.properties"));
} catch (IOException ex) {
ex.printStackTrace();
}
Get rid of the "classpath" prefix.: .getBundle("/properties/custom")
The "classpath" prefix is not a standard, it is defined by some frameworks like spring.