title: Static resources are not being served
body: <p>I want to serve static resources in my <strong>spring web MVC application</strong>. In this project, I am using annotation based configuration, but static resources are not getting served. I tried from both side:</p>
  
  <p><strong>1st way</strong></p>
  
  <pre><code>public void addResourceHandlers(ResourceHandlerRegistry registry) {
  
  registry.addResourceHandler("/resources/**").addResourceLocations("/WEB-INF/resources/");
  }
  </code></pre>
  
  <p><strong>2nd way</strong></p>
  
  <pre><code>public void addResourceHandlers(ResourceHandlerRegistry registry) {
  registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
  }
  </code></pre>