CustomerRepository.java
531 Bytes
package com.PFE.ServerManager;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
// This will be AUTO IMPLEMENTED by Spring into a Bean called userRepository
// CRUD refers Create, Read, Update, Delete
//This class allows the JPA to know that the Customer class is a table
//Need to check if "extends JpaRepository is more useful"
@Repository
public interface CustomerRepository extends JpaRepository<Customer, Integer> {
Customer findByEmail(String email);
}