在https://www.tutorialspoint.com/neo4j/neo4j_cypher_api_example.htm和How to load CSV file with cypher in java?中,始终存在以下两个导入行:
import org.neo4j.cypher.javacompat.ExecutionEngine;
import org.neo4j.cypher.javacompat.ExecutionResult;
但是,当我尝试导入这两个项目时出现错误。对于类ExecutionEngine,似乎我可以从org.neo4j.cypher.internal或org.neo4j.cypher.internal.javacompat导入,我应该导入哪一个(因为我没有做任何错误,所以我无法从org.neo4j导入.cypher.javacompat)?
我无法从org.neo4j.cypher.javacompat导入的原因是什么?
我正在使用的maven存储库中驱动程序的相关依赖项:
<dependency>
<groupId>org.neo4j.driver</groupId>
<artifactId>neo4j-java-driver</artifactId>
<version>1.2.1</version>
</dependency>
答案 0 :(得分:0)
您的依赖关系不正确 - org.neo4j.cypher.javacompat不属于Neo4j Java驱动程序,而是:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>${neo.version}</version>
</dependency>
有关详细信息,请参阅https://neo4j.com/docs/java-reference/current/#_add_neo4j_as_a_dependency