Я новичок в использовании JPA, я читаю онлайн-уроки, и все они выходят из JPAR-репозитория, как показано ниже
с этой страницы
https://www.callicoder.com/spring-boot-jpa-hibernate-postgresql-restful-crud-api-example/
package com.example.postgresdemo.repository;
import com.example.postgresdemo.model.Answer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface AnswerRepository extends JpaRepository<Answer, Long> {
List<Answer> findByQuestionId(Long questionId);
}
Но в моем проекте Eclipse жалуется на следующее
The type JpaRepository<Property,Long> cannot be the superclass of PropertyRepository; a superclass must be a class
Ниже мой класс
package realestate.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import realestate.model.Property;
import java.util.List;
@Repository
public class PropertyRepository extends JpaRepository<Property, Long> {
}