title: Spring BOOT static resources mapping
body: <p>I know this question is ask often, but nothing of it works for me.
  I want to access the static resources, so I have a template in which I load "../resources/css/style.css".</p>
  
  <p>But when I start the application the browser can not access the css file.<br>
  I am using Spring Boot 1.1.9 (also as parent in pom.xml).<br>
  My Structure is:<br></p>
  
  <blockquote>
    <p>pom.xml<br>
    src/main/java<br>
    src/main/resources<br>
    src/main/resources/database<br>
    src/main/resources/templates<br>
    src/main/resources/templates/index.html<br>
    src/main/resources/static<br>
    src/main/resources/static/resources<br>
    src/main/resources/static/resources/css<br>
    src/main/resources/static/resources/fonts<br>
    src/main/resources/static/resources/img<br>
    src/main/resources/static/resources/js<br></p>
  </blockquote>
  
  <p>(see <a href="http://i62.tinypic.com/of84jt.png" rel="nofollow">http://i62.tinypic.com/of84jt.png</a>)</p>
  
  <p>My Controller:</p>
  
  <pre><code>package prototype.controller;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  
  @Controller
  public class IndexController {
  
    @RequestMapping("/")
    public String stdRedirect(){
      return "redirect:/index";
    }
  
    @RequestMapping(value="/index", method=RequestMethod.GET)
    public String index(){
      return "index";
    }
  }
  </code></pre>
  
  <p>Main:</p>
  
  <pre><code>@Configuration
  @EnableAutoConfiguration
  @ComponentScan
  public class Prototype {
    public static void main(String[] args) throws Exception {
      SpringApplication.run(Prototype.class, args);
    }
  }    
  </code></pre>
  
  <p>I read that springboot automatic maps /static/ and /resources files...</p>