gpt4 book ai didi

neo4j - Spring Data Neo4j 4 与 Neo4j 3.0 : How to pass configuration to embedded driver?

转载 作者:行者123 更新时间:2023-12-01 13:42:34 24 4
gpt4 key购买 nike

我正在将现有的 Spring Data Neo4j 3 应用程序(使用 Neo4j 2.x)迁移到使用 Neo4j 3.0 的 Spring Data Neo4j 4.1。

实际迁移已经完成,但应用程序现在无法启动

org.neo4j.kernel.impl.storemigration.UpgradeNotAllowedByConfigurationException: Failed to start Neo4j with an older data store version. To enable automatic upgrade, please set configuration parameter "dbms.allow_format_migration=true"

我实际上从以前的升级中知道这条消息,我曾经在我的 neo4j.properties 中配置它,我在使用 GraphDatabaseFactory 创建嵌入式数据库时手动加载了它。

然而,对于 SDN 4,这不再是必需的/不可能的。如文档中所述,我现在只有:

@Bean
public Configuration getConfiguration()
{
String uri = getDatabaseUri();
Configuration config = new org.neo4j.ogm.config.Configuration();
config.set("dbms.allow_format_migration", "true"); // Allow upgrade of neo4j version
config.driverConfiguration()
.setDriverClassName("org.neo4j.ogm.drivers.embedded.driver.EmbeddedDriver")
.setURI(uri);
return config;
}

这看起来可以设置额外的配置,但这没有效果。我还尝试在设置了此选项的(嵌入式)DB 文件夹中放置一个 neo4j.conf,但没有成功。

现在如何实际配置嵌入式实例?

最佳答案

目前,这是不可能的,并且有一个 Unresolved 问题:https://github.com/neo4j/neo4j-ogm/issues/151

在此期间,请在 SDN 之外升级您的 Neo4j 实例

关于neo4j - Spring Data Neo4j 4 与 Neo4j 3.0 : How to pass configuration to embedded driver?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38743946/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com