Modified PR to reflect coding style

This commit is contained in:
Nanne Baars
2019-09-10 13:53:30 +02:00
parent 0ac8b7c716
commit 43c25dc3bb
3 changed files with 33 additions and 53 deletions

View File

@ -14,9 +14,12 @@ import org.springframework.stereotype.Service;
@Service
public class UserService implements UserDetailsService {
@Autowired
private UserRepository userRepository;
public UserService(UserRepository userRepository) {
this.userRepository = userRepository;
}
@Override
public WebGoatUser loadUserByUsername(final String username) throws UsernameNotFoundException {
WebGoatUser webGoatUser = userRepository.findByUsername(username);