Java 使用GraphRespository时,弹簧数据neo4j样本中存在错误
嗨,我下载了一个spring数据neo4j的示例代码。我面临以下错误,有人能帮我吗 代码段:Java 使用GraphRespository时,弹簧数据neo4j样本中存在错误,java,neo4j,spring-data-neo4j,node-neo4j,Java,Neo4j,Spring Data Neo4j,Node Neo4j,嗨,我下载了一个spring数据neo4j的示例代码。我面临以下错误,有人能帮我吗 代码段: public interface PersonRepository extends GraphRepository<Person> { Person findByName(String name); Iterable<Person> findByTeammatesName(String name); } 错误: The return types are inco
public interface PersonRepository extends GraphRepository<Person> {
Person findByName(String name);
Iterable<Person> findByTeammatesName(String 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
返回类型与继承的方法PagingAndSortingRepository.findAll(Sort)、crudepository.findAll(Sort)PersonRepository.java/SpringDataForNeo4j/src第5行java问题不兼容
返回类型与继承的方法Repository.count()、crudepository.count()PersonRepository.java/SpringDataForNeo4j/src第5行java问题不兼容
返回类型与继承的方法Repository.findAll()、crudepository.findAll()PersonRepository.java/SpringDataForNeo4j/src第5行java问题不兼容
有人能帮我解决这个问题吗。我通过更新这些JAR解决了这个问题: (spring数据共享和 SpringDataCommonsCore)的最新版本。
无论如何,我认为这是图书馆的问题。转到获取最新的JAR。根据“错误消息”,您的存储库正在继承返回类型冲突的方法。1) 你什么时候得到错误?(编译时?)2)PersonRepository.java的第5行是什么?3) 你从哪里得到密码的?“一个示例代码”是什么意思?您正在运行哪个版本的SDN?
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