title: Spring Security error: no bean named "springSecurityFilterChain"
body: <p>I am working on a project where I seek to implement Spring Security, but I have an error since I put the filter and filter mapping in web.xml. I am currently following a tutorial where the person in the video follows the same steps as me and didnt get any error, but I do. So i am quite confused. Is there anyone that could help me a bit?<a href="https://i.stack.imgur.com/6FkiC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6FkiC.png" alt="enter image description here" /></a></p>
  <p>I am also attaching my code.
  This is what I put in web.xml:</p>
  <pre><code>&lt;filter&gt;
          &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
          &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt;
  &lt;/filter&gt;
   
  &lt;filter-mapping&gt;
          &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt; 
  </code></pre>
  <p>And this is my SecurityConfiguration.java class:</p>
  <pre><code>import org.springframework.context.annotation.Bean;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.context.annotation.Configuration;
  import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
  import org.springframework.security.config.annotation.web.builders.HttpSecurity;
  import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
  import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
  import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
  import org.springframework.security.crypto.password.PasswordEncoder;
  
  @Configuration
  @EnableWebSecurity
  public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
  
      @Autowired
      public void configureGlobalSecurity(AuthenticationManagerBuilder auth)
              throws Exception {
          auth.inMemoryAuthentication().withUser(&quot;Checu&quot;).password(&quot;dummy&quot;)
                  .roles(&quot;USER&quot;, &quot;ADMIN&quot;);
      }
  
      @Override
      protected void configure(HttpSecurity http) throws Exception {
          http.authorizeRequests().antMatchers(&quot;/login&quot;).permitAll()
                  .antMatchers(&quot;/&quot;, &quot;/*todo*/**&quot;).access(&quot;hasRole('USER')&quot;).and()
                  .formLogin();
      }
  }
  </code></pre>
  <p>It's not much, but I'd like to make it work and when i call the localhost:8080/login to show to default login form.
  Thanks in advance a bunch.</p>