| package com.pt.service; |
| |
| import com.pt.entity.Admin; |
| import org.springframework.beans.factory.annotation.Autowired; |
| import org.springframework.stereotype.Service; |
| |
| import com.pt.repository.AdminRepository; |
| |
| @Service |
| public class AdminService { |
| |
| @Autowired |
| private AdminRepository adminRepository; |
| |
| public AdminService(AdminRepository adminRepository) { |
| this.adminRepository = adminRepository; |
| } |
| |
| public Admin findByUsernameAndPassword(String username, String password) { |
| return adminRepository.findByUsernameAndPassword(username, password); |
| } |
| |
| } |