title: Unable to read text file from spring boot jar
body: <p>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. </p>
  
  <p>here is my pom</p>
  
  <pre><code>&lt;resource&gt;
      &lt;directory&gt;src/main/resources&lt;/directory&gt;
      &lt;includes&gt;
        &lt;include&gt;**/*.*&lt;/include&gt;
      &lt;/includes&gt;
    &lt;/resource&gt;
  </code></pre>
  
  <p>And here is the exception:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I opened the xyz-0.0.1-SNAPSHOT.jar file and the 9.txt is in BOOT-INF/classes folder. </p>
  
  <p>Thanks,
  -dj</p>