spring boot 整合neo4j 5 ,查询路径时出现两个问题
依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-neo4j</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ogm-http-driver</artifactId>
<version>3.2.0</version>
</dependency>
1.Resolved [org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Invoked method is not a property accessor]
这是查询代码
@Query("match p = (n:Customer)-[*..5]-() with p, length(p) as l order by l desc limit 1 return p")
Path path();
2.java.util.NoSuchElementException: null
@Query("match p = (n:Customer)-[*..5]-() with p, length(p) as l order by l limit 1 return p")
Path path()
但相同的语句在neo4j中能查询到值
