title: spring security | security config permitall not working
body: <p>@EnableWebSecurity
      public class WebSecurityConfig implements WebMvcConfigurer {</p>
  
  <pre><code>@Bean
  public UserDetailsService userDetailsService() throws Exception {
      InMemoryUserDetailsManager manager = new InMemoryUserDetailsManager();
      manager.createUser(User.withDefaultPasswordEncoder().username("user").password("user").roles("USER").build());
      return manager;
  }
  
  protected void configure(HttpSecurity http) throws Exception {
      http
          .authorizeRequests().antMatchers("/css/**").permitAll()
          .anyRequest().authenticated();
  }
  }
  </code></pre>
  
  <p>Above code is not working, url: localhost:8080/css/styles.css is redirecting to login page. 
  The code layout is, src/main/resources/static folder has html, css and js folders inside of which files remain. </p>
  
  <p>Thanks in advance. </p>