无法使用凭据从 Spring Boot 应用程序连接到 Neo4J 数据库

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

我能够从 Spring Boot 应用程序连接到 Neo4J 数据库,无需身份验证。我现在启用了身份验证并尝试连接,但它正在抱怨

“TransactionSystemException:无法打开新的 Neo4j 会话:不支持的身份验证令牌,仅在禁用身份验证时才允许方案“无”。”

我的 application.properties 文件中有以下内容。

spring.data.neo4j.uri=bolt://localhost:7687
spring.data.neo4j.username=neo4j
spring.data.neo4j.password=myPassw@rd

我能够使用凭据连接到 Neo4J 浏览器。我确实重新启动了数据库,但仍然遇到这个问题。看来 Spring Boot 没有在属性文件中使用用户名密码。任何帮助将不胜感激。谢谢。

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

其实是我的application.properties文件应该是:

spring.neo4j.uri=bolt://localhost:7687
spring.neo4j.authentication.username=neo4j
spring.neo4j.authentication.password=myPassw@rd

更改它解决了我的问题。

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