Could not autowire field: private org.springframework.security.authentication.AuthenticationManager
Create another WebSecurityConfigurerAdapter
class that will be the "main" configuration and add the following code in order to expose an AuthenticationManager
bean:
@Bean
public AuthenticationManager customAuthenticationManager() throws Exception {
return authenticationManager();
}