报错Could not open a new Neo4j session: Unsupported authentication token, scheme ‘none‘ is only ......

解决由过度引入依赖导致冲突产生的错误

使用vue编写前端echarts,结合后端springboot对neo4j数据库操作时,在pom.xml文件中引入了一个所谓的neo4j依赖如下:

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-data-neo4j</artifactId>
</dependency>

结果在编写后台管理系统对用户信息进行操作时,发现出现了报错:

 打开浏览器控制台查看具体报错:

 来到后端,打开IDEA查看日志报错:

Resolved [org.springframework.transaction.TransactionSystemException: Could not open a new Neo4j session: Unsupported authentication token, scheme 'none' is only allowed when auth is disabled.; nested exception is org.neo4j.driver.exceptions.AuthenticationException: Unsupported authentication token, scheme 'none' is only allowed when auth is disabled.]

 至此,基本可以确定是neo4j的依赖在作祟,将其删除,果然问题解决:

 

最后思考我应该如何才能引入正确的neo4j依赖包呢,几经搜索找到答案:

<!-- neo4j driver 服务器开发-->
		<dependency>
			<groupId>org.neo4j.driver</groupId>
			<artifactId>neo4j-java-driver</artifactId>
			<version>4.1.1</version>
		</dependency>

以上就是我解决这个问题的全部思路,希望可以帮助到大家少走弯路。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值