问题描述

springboot 连接 neo4j 一直连接失败

Caused by: org.neo4j.driver.v1.exceptions.ServiceUnavailableException:Connection to the database terminated. This can happen due to network instabilities, or due to restarts of the database

问题原因

版本问题,驱动版本:1.6.1,neo4j版本:5.10.0, 驱动版本太低

解决方案

提高驱动版本

        <dependency>
            <groupId>org.neo4j.driver</groupId>
            <artifactId>neo4j-java-driver</artifactId>
            <version>4.4.12</version>
        </dependency>
Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐