package com.indexzero.finals.service.impl; import com.indexzero.finals.repository.EmployeeRepository; import com.indexzero.finals.service.EmployeeService; 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; @Service public class UserDetailsServiceImpl implements UserDetailsService { @Autowired private EmployeeRepository employeeRepository; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { return employeeRepository.findByLogin(username); } }