Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package br.ufc.mandacaru5.config.security;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.security.core.userdetails.UserDetails;
- import org.springframework.security.core.userdetails.UserDetailsService;
- import org.springframework.security.core.userdetails.UsernameNotFoundException;
- import org.springframework.stereotype.Service;
- import br.ufc.mandacaru5.repository.LoginRepository;
- @Service
- public class UserDetailsServiceImpl implements UserDetailsService {
- @Autowired
- LoginRepository loginRepository;
- @Override
- public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {
- return loginRepository.findByEmail(email);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement