title: reference a .css file with thymeleaf in spring mvc
body: <p>I am doing a project with spring MVC and Thymeleaf. I have a question about how I should reference my CSS files if I have this folder structure: </p>
  
  <pre><code>src
    main
      webapp
       resources
         myCssFolder
           myCssFile.css
       web-inf
         spring
         views
           myViewFolder
             index.html
  </code></pre>
  
  <p>My configuration class is like this:</p>
  
  <pre><code>@Override
  public void addResourceHandlers(ResourceHandlerRegistry registry) {
      registry.addResourceHandler("/css/**").addResourceLocations("/css/**");
      registry.addResourceHandler("/img/**").addResourceLocations("/img/**");
      registry.addResourceHandler("/js/**").addResourceLocations("/js/**");
      registry.addResourceHandler("/sound/**").addResourceLocations("/sound/**");
      registry.addResourceHandler("/fonts/**").addResourceLocations("/fonts/**");
  }
  </code></pre>
  
  <p>And I call <code>href</code> in my index file like this: </p>
  
  <pre><code>href="resources/css/bootstrap.min.css"
  </code></pre>
  
  <p>But there are some elements that are kind of messed up in my page, for example the CSS is not working.</p>