In my previous project i had AuthenticationManager configured like this:

@Bean AuthenticationManager authenticationManager(HttpSecurity http, BCryptPasswordEncoder bCryptPasswordEncoder, UserDetailsService userDetailsService) throws Exception { return http.getSharedObject(AuthenticationManagerBuilder.class) .userDetailsService(users()) .passwordEncoder(bCryptPasswordEncoder) .and() .build(); }

But now i see that ".and()" is deprecated. What would be the new approach for this?

Comment From: andreilisa

This question is for StackOverflow, you could ask it there using spring-security tag. Also you could find something similar on my answer about it rewriting-a-spring-security-deprecated-authenticationmanager-httpsecurity

Comment From: jzheaux

Hi, @ximq33, thanks for reaching out. And @andreilisa thanks for the links. I added my response to the link; I hope it helps.