title: Spring Boot project with static content generates 404 when running jar
body: <p>The recent blog post (<a href="https://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot">https://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot</a>) by Spring regarding the use of static web content in Spring Boot projects indicates that several resource directories may be used:</p>
  
  <ul>
  <li>/META-INF/resources/</li>
  <li>/resources/</li>
  <li>/static/</li>
  <li>/public/</li>
  </ul>
  
  <p>This is thanks to the WebMvcAutoConfiguration class which automatically adds these directories to the classpath. This all seems fine and appears to work when using the <strong>spring-boot-maven-plugin</strong> <em><strong>spring-boot:run</em></strong> goal, all of your static content is working (eg: /index.html).</p>
  
  <p>When you package your Spring Boot project and allow the <strong>spring-boot-maven-plugin</strong> to create the enhanced JAR then attempt to run your project using <code>java -jar my-spring-boot-project.jar</code> you find that your static content now returns a 404 error.</p>