I am trying to read a file in the resources folder of my Spring boot console application but I am getting file not found exception.
here is my pom
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
And here is the exception:
java.io.FileNotFoundException: class path resource [9.txt] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:/Users/abc/Documents/workspace-sts-3.8.4.RELEASE/xyz/target/xyz-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/9.txt
I opened the xyz-0.0.1-SNAPSHOT.jar file and the 9.txt is in BOOT-INF/classes folder.
Thanks, -dj