My Java program looks for ogm.properties
in an application-specific $DATA_DIR
and loads a Configuration
that it uses to construct a SessionFactory
. The default ogm.properties
uses the embedded driver and a file URI that points to a subdirectory of $DATA_DIR
. So far so good.
The idea is that the user could supply their own ogm.properties
that uses a different driver. Therefore, I can't pass a custom GraphDatabaseService
to the EmbeddedDriver
constructor because I don't construct it myself.
How can I pass configuration options to the embedded driver? I tried placing a neo4j.conf
in various locations under $DATA_DIR
, but it didn't seem to be recognized.
In Neo4j 3.1.6 upcoming by the end of 2018 you'll be able to do the following:
In
ogm.properties
:Or programmatically in Java configuration:
To pass a configuration file from file or classpath resource to the embedded instance.