In my java project, I have a .json file which I have placed in resource folder.
When I am trying to read this .json file in my main class using the getResourceAsStream() method, I am getting a FileNotFoundException.
ClassLoader classLoader = getClass().getClassLoader();
InputStream inputStream = classLoader.getResourceAsStream(fileName);
I checked that under folder target > classes this .json file is not present.
I am not sure why this .json file is not being copied to the target folder. Need help to understand the reason. It is a Maven project and I am using IntelliJ to build and run the project.