嗨,我已经下载了 spring data neo4j 的一个示例代码。我面临以下错误,有人可以帮忙吗?
代码片段:
public interface PersonRepository extends GraphRepository<Person> {
Person findByName(String name);
Iterable<Person> findByTeammatesName(String name);
}
应用程序.java
PersonRepository personRepository = ctx.getBean(PersonRepository.class);
GraphDatabase graphDatabase = ctx.getBean(GraphDatabase.class);
Transaction tx = graphDatabase.beginTx();
try {
personRepository.save(greg);
personRepository.save(roy);
personRepository.save(craig);
greg = personRepository.findByName("Greg");
//......
for (String name: new String[]{greg.name, roy.name, craig.name}) {
System.out.println(personRepository.findByName(name));
错误 :
The return types are incompatible for the inherited methods PagingAndSortingRepository<Person,Long>.findAll(Sort), CRUDRepository<Person>.findAll(Sort) PersonRepository.java /SpringDataForNeo4j/src line 5 Java Problem
The return types are incompatible for the inherited methods Repository<Person,Long>.count(), CRUDRepository<Person>.count() PersonRepository.java /SpringDataForNeo4j/src line 5 Java Problem
The return types are incompatible for the inherited methods Repository<Person,Long>.findAll(), CRUDRepository<Person>.findAll() PersonRepository.java /SpringDataForNeo4j/src line 5 Java Problem
有人可以帮我解决这个问题吗?