How to find a file in the Resources folder in maven using Java code example
Example 1: java resource file
File file = new File(
getClass().getClassLoader().getResource("database.properties").getFile()
);
Example 2: java resource file
InputStream inputStream = getClass()
.getClassLoader().getResourceAsStream("database.properties");