title: Spring Security does not intercept requests
body: <p>I have a legacy application in which I have added Spring Web MVC libraries in order to expose a new Rest API.</p>
  
  <p>I am struggling integrating spring-security in order to  intercept the incoming requests. I have set up a security configuration class </p>
  
  <pre><code>@EnableWebSecurity
  public class SecurityConfig extends WebSecurityConfigurerAdapter {
  
  @Autowired
  public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
      auth
          .inMemoryAuthentication()
              .withUser("user").password("password").roles("USER");
  }
  
  
  @Override
  protected void configure(HttpSecurity http) throws Exception {
        http.csrf().disable().authorizeRequests().anyRequest().authenticated().and().httpBasic();
  
     }
  }
  </code></pre>
  
  <p>and a security application initializer</p>
  
  <pre><code>public class SecurityWebApplicationInitializer extends   
   AbstractSecurityWebApplicationInitializer {
   }
  </code></pre>
  
  <p>following relevant guides.</p>
  
  <p>Using debugger I verified that during initializing my configuration class is loaded. My problem is that my requests are not intercepted as expected.</p>