@@ -121,6 +121,39 @@ This is the bare minimum of what you need to connect to a Neo4j instance.
121121NOTE: It is not necessary to add any programmatic configuration of the driver when you use this starter.
122122SDN repositories will be automatically enabled by this starter.
123123
124+ [[running-on-the-module-path]]
125+ == Running on the Module-Path (Java 9+)
126+
127+ Spring Data Neo4j can run on the module path. It's automatic module name is `spring.data.neo4j`.
128+ It does not provide a module itself due to restrictions in the current Spring Data build setup.
129+ Hence, it uses an automatic but stable module name. However, it does depend on
130+ a modularized library (the https://github.com/neo4j-contrib/cypher-dsl[Cypher-DSL]). Without a `module-info.java` due to
131+ the restriction mentioned above, we cannot express the requirement for that library on your behalf.
132+
133+ Therefore, the minimal required `module-info.java` in your project for running Spring Data Neo4j 6.1+ on the module path
134+ is the following:
135+
136+ .A `module-info.java` in a project supposed to use Spring Data Neo4j on the module path
137+ [source,java]
138+ ----
139+ module your.module {
140+
141+ requires org.neo4j.cypherdsl.core;
142+
143+ requires spring.data.commons;
144+ requires spring.data.neo4j;
145+
146+ opens your.domain to spring.core; // <.>
147+
148+ exports your.domain; // <.>
149+ }
150+ ----
151+ <.> Spring Data Neo4j uses Spring Data Commons and it's reflective capabilities, so
152+ you would need to open up your domain packages to `spring.core` at least.
153+ <.> We assume here that `your.domain` contains also repositories: Those must be exported to be accessible by
154+ `spring.beans`, `spring.context` and `spring.data.commons`. If you don't want to export them to the world,
155+ you can restrict them to those modules.
156+
124157[[create-domain-spring-boot-project]]
125158== Create your domain
126159
0 commit comments