здесь ошибка
public void configure(AuthenticationManagerBuilder authenticationManagerBuilder) throws Exception {
authenticationManagerBuilder.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());
}
UserDetailsServicelmpl
@ Autowired UserRepository userRepository;
@Transactional
@Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
User user = userRepository.findByUsername(username)
.orElseThrow(()->new UsernameNotFoundException("User not found with username"+ username));
return UserDetailslmpl.build(user);
}