public interface StudentRepository extends JpaRepository<Student, Long> {
<T> List<T> findAllBy(Class<T> type);
}
List<Student> studentList = stduentRepository.findAllBy(Student.class);
public interface TuitionRepository extends JpaRepository<Tuition, Long> {
<T> List<T> findAllBy(Class<T> type);
}
List<Tuition> tuitionList = tuitionRepository.findAllBy(Tuition.class);