Ejemplo n.º 1
0
 @Transactional(readOnly = true)
 @Override
 public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
   User user = userRepository.findByUsername(username);
   if (user == null) {
     throw new UsernameNotFoundException("The username could not be found on database.");
   }
   return user;
 }
Ejemplo n.º 2
0
 @Transactional(readOnly = true)
 @Override
 public User findSystemUser() {
   return userRepository.findByUsername(SYSTEM_LOGIN);
 }
Ejemplo n.º 3
0
 @Transactional(readOnly = true)
 @Override
 public User findByUsername(String username) {
   return userRepository.findByUsername(username);
 }