无法使用 Neo4j 连接数据库

问题描述 投票:0回答:1

我试图在DataBase中使用Neo4j创建一个java springboot项目,当我尝试在postman中执行和测试我的Api时,它向我显示了这个错误:

Connection to the database terminated. Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0.

我已经通过在 application.properties:

中添加此行来验证加密所需的内容
spring.data.neo4j.uri=bolt://localhost:7687
spring.data.neo4j.username=Example1
spring.data.neo4j.password=secret
spring.data.neo4j.database =stud
org.neo4j.driver.config.encrypted=true

我怎样才能找到解决我的问题的方法 谢谢

java spring-boot neo4j spring-data-neo4j
1个回答
0
投票

我有同样的问题,我通过以下步骤解决了它。 (可能还有另一种方法,但这对我有用)。

  1. 在 Neo4j 中创建新项目
  2. 设置项目密码
  3. 连接时使用数据库名称,用户名“neo4j”,密码用于创建项目。

完成这些步骤后,我就可以连接到 Neo4j 数据库了。

谢谢,

阿图尔

© www.soinside.com 2019 - 2024. All rights reserved.