springboot整合neo4j报错:Could not find mappable nodes or relationships inside Record
springboot整合neo4j报错Could not find mappable nodes or relationships inside Record for org.springframework.data.neo4j.core.mapping.DefaultNeo4jPersistentEntity@6662974a
·
1.使用Neo4jRepository的时候报错:
Could not find mappable nodes or relationships inside Record<{m: node<1212>}> for
org.springframework.data.neo4j.core.mapping.DefaultNeo4jPersistentEntity@6662974a
2.看一下dao层的代码
相信大家也看出来了,这里的实体类泛型写错了,它应该是Neo4j数据库中操作的对象类型,正确的是下面这样
public interface ColumnsMapper extends Neo4jRepository<GraphColumn, Long> {
@Query("MATCH (n:Column) where id(n) = $id return n")
GraphColumn getColumnInfo(@Param("id") Long id);
}
更多推荐




所有评论(0)