Environment:
I have 2 authentication providers - one that hits ActiveDirectory, and then one that hi
I had the same problem and another solution worked in my case. The difference is, that I had simply username and password, database authentication.
@Override
protected void configure(AuthenticationManagerBuilder authManagerBuilder) throws Exception {
authManagerBuilder
.userDetailsService(userDetailsService())
.passwordEncoder(passwordEncoder());
}
@Bean
UserDetailsService userDetailsService() {
return new UserDetailsService();
}
The fix was to add the @Override annotation to the @Bean annotated method:
@Bean
@Override
UserDetailsService userDetailsService() {
return new UserDetailsService();
}