【发布时间】: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