title: Classpath resource not resolving in spring boot
body: <p>I am using spring boot and I have a file in resources folder. I am using digital ocean machine and when i run the application using java -jar mywebapp.war, I am unable to access the file from classpath. I am accessing it using following standard syntax:</p>
  
  <pre><code>File file = new ClassPathResource("mfile").getFile();
  </code></pre>
  
  <p>I am getting error that class path resource cannot be resolved to absolute path. The problem I see is that it is showing the path with ! marks as follows:</p>
  
  <pre><code>/home/u/webapp/target/mywebapp.war!/WEB-INF/classess!/mfile
  </code></pre>
  
  <p>What am I doing wrong here?</p>