,,@Bean
public AuthenticationProvider authenticationProvider(UserDetailService userDetailService) {
DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider();
authenticationProvider.setUserDetailsService(userDetailService);
authenticationProvider.setPasswordEncoder(passwordEncoder());
return authenticationProvider;
}