use of com.laurentiuspilca.ssc6.security.model.SecurityUser in project youtubechannel by lspil.
the class JpaUserDetailsService method loadUserByUsername.
@Override
public UserDetails loadUserByUsername(String username) {
var o = userRepository.findUserByUsername(username);
User u = o.orElseThrow(() -> new UsernameNotFoundException(":("));
return new SecurityUser(u);
}
Aggregations