title: Run spring boot jar with static content
body: <p>I'm using spring boot and storing my static content (html, css, etc.) as <code>src/main/webapp</code>. I understand that this is not recommended, because it won't be stored in jar file (should be in <code>/META-INF/resources/</code>, <code>/resources/</code>, <code>/static/</code>, <code>/public/</code>). But my question is not about storing static content in jar.</p>
  
  <p>This is project structure: </p>
  
  <pre><code>App
   ├──src
   |   └───main
   |        ├── java
   |        |     └── ...
   |        ├── resources
   |        |     └── (everything here will be in jar)
   |        └── webapp &lt;- this won't be in jar
   |               └── ...
   └ target
       └───App.jar
  </code></pre>
  
  <p>When I'm trying to run jar from <code>App</code> folder as <code>java -jar target/App.jar</code>, spring boot finds static content and works fine. However running it from <code>target</code> folder as <code>java -jar App.jar</code> won't find static content.</p>
  
  <p>How to run <code>App.jar</code> from target folder and let spring boot find static content? Is it related to the classpath? I was trying to specify the classpath with <code>-cp</code> option, but it doesn't work.</p>