简体   繁体   English

如何更改 Neo4j Java 驱动程序的配置属性?

[英]How can I change configuration property for Neo4j Java driver?

I am doing a homework assigment about Neo4j. I am using Neo4j Java driver library with Scala. I made a query to load data from CSV but error appears:我正在做一个关于 Neo4j 的家庭作业。我正在使用 Neo4j Java 驱动程序库和 Scala。我查询从 CSV 加载数据,但出现错误:

configuration property 'dbms.security.allow_csv_import_from_file_urls' is false
    at org.neo4j.driver.internal.util.Futures.blockingGet(Futures.java:111)

Is there a way to change this property in IntelliJ?有没有办法在 IntelliJ 中更改此属性? Thank you!谢谢!

I tries to google the problem, but it didn't found any answers.我试图用谷歌搜索这个问题,但没有找到任何答案。

This property is not managed by Neo4j Java Driver, it is managed by Neo4j server.此属性不受 Neo4j Java Driver 管理,它由 Neo4j 服务器管理。

It is documented here: https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/它记录在这里: https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/

Depending on how Neo4j server is deployed, there are multiple ways of updating it.根据 Neo4j 服务器的部署方式,有多种更新方式。 For instance:例如:

  1. Binary: add dbms.security.allow_csv_import_from_file_urls=true to <neo4j-home>/conf/neo4j.conf OR ensure it is not set there as it should be true by default二进制:将dbms.security.allow_csv_import_from_file_urls=true添加到<neo4j-home>/conf/neo4j.conf或确保它没有设置在那里,因为默认情况下它应该是true
  2. Docker: set environment variable NEO4J_dbms_security_allow__csv__import__from__file__urls=true (more details here: https://neo4j.com/docs/operations-manual/current/docker/configuration/ ) Docker:设置环境变量NEO4J_dbms_security_allow__csv__import__from__file__urls=true (更多细节在这里: https://neo4j.com/docs/operations-manual/current/docker/configuration/
  3. Neo4j Desktop: edit settings of the target DBMS Neo4j 桌面:编辑目标 DBMS 的设置
  4. Neo4j Aura: CSV file should be loaded as a remote file. Neo4j Aura:CSV 文件应作为远程文件加载。 This error can be reproduced when query references a local file.当查询引用本地文件时,可以重现此错误。 See the documentation for more details: https://neo4j.com/docs/aura/auradb/importing/importing-data/有关详细信息,请参阅文档: https://neo4j.com/docs/aura/auradb/importing/importing-data/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM