title: Adding patterns to addResourceHandler always returned error when want to serve static content
body: <p>I went through all question here, all docs according to <code>Spring</code> and couldn't find solution which make my case work. 
  The case is that I would like to secure my application (<code>Spring Boot with Angular 4</code>) by <code>Spring Security</code>. So the first things which I did was to add two <code>Configuration</code> classes, ex:</p>
  
  <pre><code>@Configuration
  @EnableWebSecurity
  public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
  
  
      @Override
      protected void configure(HttpSecurity http) throws Exception {
          http.csrf().disable().authorizeRequests()
                  .anyRequest().permitAll().and().httpBasic();
      }
  
  @Configuration
  @EnableWebMvc
  @ComponentScan("com.inventory")
  public class WebConfig extends WebMvcConfigurerAdapter {
  
      @Override
      public void addResourceHandlers(ResourceHandlerRegistry registry) {
          registry.addResourceHandler("/", "/#/", "/resources/static/**")
                  .addResourceLocations("/resources/static/index.html", "/resources/static/index.html", "/resources/static/index.html");
      }
  }
  
  @Controller
  public class ViewController {
  
      @RequestMapping(value = "/#/")
      public String index() {
          return "forward:/resources/static/index.html";
      }
  
      @RequestMapping(value = "/")
      public String home() {
          return "index.html";
      }
  }
  </code></pre>
  
  <p>As you see in <code>Controller</code> I tried to use to diffrent attempts to serve static content. Unfortunately all this returns:</p>
  
  <pre><code>There was an unexpected error (type=Internal Server Error, status=500).
  Could not resolve view with name 'index.html' in servlet with name 'dispatcherServlet'
  </code></pre>
  
  <p>What am I doing wrong? Why I can't get this static content? Of course my static content is under <code>resources/static</code> and there are <code>.js</code> files and ex. <code>index.html</code>.</p>