title: Error creating bean with name 'authenticationManagerBean'
body: <p>I get Error creating bean with name 'authenticationManagerBean': Requested bean is currently in creation: Is there an unresolvable circular reference?</p>
  
  <p>What i do bad ? </p>
  
  <pre><code>@EnableResourceServer
  @Configuration
  public class ResourceServerConfig extends WebSecurityConfigurerAdapter {
  
      private final AuthenticationManager authenticationManager;
  
      @Autowired
      public ResourceServerConfig(AuthenticationManager authenticationManager) {
          this.authenticationManager = authenticationManager;
      }
  
      @Override
      @Bean
      public AuthenticationManager authenticationManagerBean() throws Exception {
          return super.authenticationManagerBean();
      }
      @Override
      protected void configure(HttpSecurity http) throws Exception {
          http.requestMatchers()
                  .antMatchers( "/login","/oauth/authorize")
                  .and()
                  .authorizeRequests()
                  .anyRequest()
                  .authenticated()
                  .and()
                  .formLogin()
                  .permitAll();
      }
  
      @Override
      protected void configure(AuthenticationManagerBuilder auth) throws Exception {
          auth.parentAuthenticationManager(authenticationManager)
                  .inMemoryAuthentication()
                  .withUser("Admin")
                  .password("admin")
                  .roles("ADMIN");
      }
  }
  </code></pre>