Beispiel #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;
 }
Beispiel #2
0
 @Transactional(readOnly = true)
 @Override
 public User findSystemUser() {
   return userRepository.findByUsername(SYSTEM_LOGIN);
 }
Beispiel #3
0
 @Transactional(readOnly = true)
 @Override
 public User findByUsername(String username) {
   return userRepository.findByUsername(username);
 }