【发布时间】:2017-05-15 08:28:45
【问题描述】:
我已使用 spring-data-neo4j v 4.2.1、neo4j-ogm v 2.1.2 进行设置。
我需要具有特定配置的嵌入式 neo4j 服务器进行测试。 cypher.forbid_shortestpath_common_nodes=false.
我在 spring @Configuration bean 中尝试了这个但没有成功:
@Bean
public org.neo4j.ogm.config.Configuration getConfiguration() {
org.neo4j.ogm.config.Configuration config = new org.neo4j.ogm.config.Configuration();
config.driverConfiguration().setDriverClassName("org.neo4j.ogm.drivers.embedded.driver.EmbeddedDriver");
config.set("cypher.forbid_shortestpath_common_nodes", false);
return config;
}
请问,如何在 spring java 配置中进行设置?
【问题讨论】:
标签: neo4j spring-data-neo4j-4 neo4j-ogm