【问题标题】:Spring Data Neo4j 4 with Neo4j 3.0: How to pass configuration to embedded driver?带有 Neo4j 3.0 的 Spring Data Neo4j 4:如何将配置传递给嵌入式驱动程序?
【发布时间】:2016-12-09 04:42:12
【问题描述】:

我正在将现有 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;
}

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

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

【问题讨论】:

    标签: neo4j spring-data-neo4j spring-data-neo4j-4 neo4j-ogm


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-13
      • 1970-01-01
      • 2016-12-26
      • 1970-01-01
      • 1970-01-01
      • 2018-03-03
      相关资源
      最近更新 更多