title: failed to GET resources/static/bower_components/angular/angular.js on Spring Boot project?
body: <p>I am learning spring boot and spring security with angularjs.</p>
  
  <p>previously I use CDN to load angular in my html, everything just fine.</p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.js"&gt;&lt;/script&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular-route.js"&gt;&lt;/script&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular-messages.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>but many people said using <code>bower</code> is better so I want to give it a try.
  I've installed bower, set the diretory to <code>resources/static/bower_components</code>, install the dependencies, and change the script.</p>
  
  <pre><code>&lt;script src="bower_components/angular/angular.js"&gt;&lt;/script&gt;
  &lt;script src="bower_components/angular-route/angular-route.js"&gt;&lt;/script&gt;
  &lt;script src="bower_components/angular-messages/angular-messages.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>but, when I load the html, it said failed 404. When I tried it on the web, <code>Whitelabel Error Page</code> error occured.</p>
  
  <p>As I know, everything in <code>resources/static</code> will be publicly available? Why I cannot access it?</p>
  
  <p><strong>--EDIT--</strong></p>
  
  <p>I am trying a solution from <a href="https://stackoverflow.com/questions/29918732/not-loading-static-resources-in-spring-boot-thymeleaf-and-angularjs-app">Not loading static Resources in Spring boot, Thymeleaf and AngularJs app</a>, but still failed.</p>
  
  <pre><code>@Configuration
  public class WebConfig extends WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter {
  
      @Override
      public void addResourceHandlers(ResourceHandlerRegistry registry) {
          registry.addResourceHandler("/bower_components/**")
                  .addResourceLocations(classpath:"/static/bower_components/");
      }
  }
  </code></pre>