title: SpringBoot - accessing a file inside resources folder
body: <p>I am accessing a File inside the resources folder from the main class </p>
  
  <pre><code>File file = new ClassPathResource("remoteUnitsIdsInOldServer.txt").getFile();
  </code></pre>
  
  <p>and I am getting this error:</p>
  
  <pre><code>java.io.FileNotFoundException: class path resource [remoteUnitsIdsInOldServer.txt] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:/Users/lopes/Documents/workspace-sts-3.9.0.RELEASE/telefonicaUtils/target/telefonicaUtils-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/remoteUnitsIdsInOldServer.txt
  </code></pre>
  
  <p>and I even open the jar file and the file remoteUnitsIdsInOldServer.txt is there, inside classes</p>