title: How add Static Web Content in Spring-boot
body: <p>I am trying to add static web content in a spring-boot server using the info <a href="http://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot" rel="noreferrer">here</a></p>
  
  <p>I have tried adding the .js and .css files I need in the several Folders that the previous link says but it doesn't work:</p>
  
  <blockquote>
  <pre><code>/META-INF/resources/
  /resources/
  </code></pre>
  </blockquote>
  
  <p>Note: I didn't created the <code>/static/</code> and <code>/public/</code> folders because I don't know the absolute Path in my project.</p>
  
  <p>I have added too the <code>addResourceHandlers</code> method:</p>
  
  <blockquote>
  <pre><code>@Override
  public void addResourceHandlers(ResourceHandlerRegistry registry) {
  if (!registry.hasMappingForPattern("/webjars/**")) {
      registry.addResourceHandler("/webjars/**").addResourceLocations(
              "classpath:/META-INF/resources/webjars/");
  }
  if (!registry.hasMappingForPattern("/**")) {
      registry.addResourceHandler("/**").addResourceLocations(
              RESOURCE_LOCATIONS);
  }
  }
  </code></pre>
  </blockquote>
  
  <p>And the reference in the HTML file are like this:</p>
  
  <p><code>&lt;script src="bootstrap-switch.js"&gt;&lt;/script&gt;</code>
  Any idea how I can fix that?</p>
  
  <p><strong>UPDATED</strong>:</p>
  
  <p><img src="https://i.stack.imgur.com/a0p2r.png" alt="enter image description here"></p>
  
  <p>UPDATED 2: trying the @jfcorugedo</p>
  
  <p>Doesnt work. Take a look, is that what was you saying?</p>
  
  <p><img src="https://i.stack.imgur.com/Qo93L.png" alt="enter image description here"></p>
  
  <p>UPDATED 3:trying the @jfcorugedo, second advice:</p>
  
  <p><img src="https://i.stack.imgur.com/hrRiJ.png" alt="enter image description here"></p>