Advertisement
andersonalmada2

Untitled

Aug 3rd, 2022
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. package br.ufc.mandacaru5.config.security;
  2.  
  3. import org.springframework.beans.factory.annotation.Autowired;
  4. import org.springframework.security.core.userdetails.UserDetails;
  5. import org.springframework.security.core.userdetails.UserDetailsService;
  6. import org.springframework.security.core.userdetails.UsernameNotFoundException;
  7. import org.springframework.stereotype.Service;
  8.  
  9. import br.ufc.mandacaru5.repository.LoginRepository;
  10.  
  11. @Service
  12. public class UserDetailsServiceImpl implements UserDetailsService {
  13.  
  14.     @Autowired
  15.     LoginRepository loginRepository;
  16.    
  17.     @Override
  18.     public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {
  19.         return loginRepository.findByEmail(email);
  20.     }
  21.  
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement