packagecom.roshka.configuration;importcom.roshka.modelo.RRHHUser;importcom.roshka.repositorio.RRHHUserRepository;importorg.springframework.beans.factory.annotation.Autowired;importorg.springframework.security.core.userdetails.UserDetails;importorg.springframework.security.core.userdetails.UserDetailsService;importorg.springframework.security.core.userdetails.UsernameNotFoundException;publicclassCustomUserDetailsServiceimplementsUserDetailsService{@AutowiredprivateRRHHUserRepositoryuserRepo;@OverridepublicUserDetailsloadUserByUsername(Stringusername)throwsUsernameNotFoundException{RRHHUseruser=userRepo.findByEmail(username);if(user==null){thrownewUsernameNotFoundException("User not found");}returnnewCustomUserDetails(user);}}