4.1.1版本java通过bolt连接失败
之前用的是3.+ 的版本,配置都是默认的,连接没有问题, 升级到4.1.1后通过java连接出现问题,配置都是默认的, 是否4.0版本后通过bolt连接需要修改什么配置 连接驱动 <dependency> <groupId>org.neo4j.driver</groupId> <artifactId>neo4j-java-driver</artifactId> <version>4.0.1</version> </dependency>
java连接代码 /** * 连接地址(不是浏览器访问的地址) / private static final String uri = “bolt://localhost:7687”; /* * 用户名 / private static final String username = “neo4j”; /* * 密码 / private static final String password = “root”; /* * driver 连接 */ private static Driver driver;
static {
driver = GraphDatabase.driver(uri, AuthTokens.basic(username, password));
}
错误信息:
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
希望有经验的大哥能给个意见
多谢了