@@ -4045,17 +4045,19 @@ the Mongo instance's configuration and logging routing.
4045
4045
[[boot-features-neo4j]]
4046
4046
=== Neo4j
4047
4047
http://neo4j.com/[Neo4j] is an open-source NoSQL graph database that uses a rich data
4048
- model of nodes connected by first class relationships, which is better suited for connected
4049
- big data than traditional RDBMS approaches. Spring Boot offers several conveniences for
4050
- working with Neo4j, including the `spring-boot-starter-data-neo4j` "`Starter`".
4048
+ model of nodes connected by first class relationships, which is better suited for
4049
+ connected big data than traditional RDBMS approaches. Spring Boot offers several
4050
+ conveniences for working with Neo4j, including the `spring-boot-starter-data-neo4j`
4051
+ "`Starter`".
4051
4052
4052
4053
4053
4054
4054
4055
[[boot-features-connecting-to-neo4j]]
4055
4056
==== Connecting to a Neo4j Database
4056
- To access a Neo4j server, you can inject an auto-configured `org.neo4j.ogm.session.Session`.
4057
- By default, the instance tries to connect to a Neo4j server at `localhost:7687` via the Bolt
4058
- protocol. The following example shows how to inject a Neo4j session:
4057
+ To access a Neo4j server, you can inject an auto-configured
4058
+ `org.neo4j.ogm.session.Session`. By default, the instance tries to connect to a Neo4j
4059
+ server at `localhost:7687` using the Bolt protocol. The following example shows how to
4060
+ inject a Neo4j `Session`:
4059
4061
4060
4062
[source,java,indent=0]
4061
4063
----
@@ -4084,15 +4086,14 @@ properties, as shown in the following example:
4084
4086
spring.data.neo4j.password=secret
4085
4087
----
4086
4088
4087
- You can take full control over the session creation by adding a
4088
- `org.neo4j.ogm.config.Configuration` `@Bean`. To completely disable the auto-configuration
4089
- provided by the "`Starter`" , add a `@Bean` of type `org.neo4j.ogm.session.SessionFactory` .
4089
+ You can take full control over the session creation by adding a
4090
+ `org.neo4j.ogm.config.Configuration` `@Bean`. Also, adding a `@Bean` of type
4091
+ `SessionFactory` disables the auto-configuration and gives you full control .
4090
4092
4091
4093
4092
4094
4093
4095
[[boot-features-connecting-to-neo4j-embedded]]
4094
4096
==== Using the Embedded Mode
4095
-
4096
4097
If you add `org.neo4j:neo4j-ogm-embedded-driver` to the dependencies of your application,
4097
4098
Spring Boot automatically configures an in-process embedded instance of Neo4j that does
4098
4099
not persist any data when your application shuts down.
@@ -4102,7 +4103,7 @@ not persist any data when your application shuts down.
4102
4103
As the embedded Neo4j OGM driver does not provide the Neo4j kernel itself, you have
4103
4104
to declare `org.neo4j:neo4j` as dependency yourself. Refer to
4104
4105
https://neo4j.com/docs/ogm-manual/current/reference/#reference:getting-started[the
4105
- Neo4j OGM documentation] for list of compatible versions.
4106
+ Neo4j OGM documentation] for a list of compatible versions.
4106
4107
====
4107
4108
4108
4109
The embedded driver takes precedence over the other drivers when there are multiple
@@ -4116,14 +4117,13 @@ kernel are on the classpath as described above.
4116
4117
[NOTE]
4117
4118
====
4118
4119
You can enable persistence for the embedded mode by providing a path to a database file
4119
- in your configuration like this: `spring.data.neo4j.uri=file://var/tmp/graph.db`.
4120
+ in your configuration, e.g. `spring.data.neo4j.uri=file://var/tmp/graph.db`.
4120
4121
====
4121
4122
4122
4123
4123
4124
4124
4125
[[boot-features-neo4j-ogm-session]]
4125
4126
==== Neo4jSession
4126
-
4127
4127
By default, if you are running a web application, the session is bound to the thread for
4128
4128
the entire processing of the request (that is, it uses the "Open Session in View"
4129
4129
pattern). If you do not want this behavior, add the following line to your
@@ -4166,8 +4166,8 @@ entities by using `@EnableNeo4jRepositories` and `@EntityScan` respectively on a
4166
4166
`@Configuration`-bean.
4167
4167
4168
4168
TIP: For complete details of Spring Data Neo4j, including its object mapping
4169
- technologies, refer to the https://projects.spring.io/spring-data-neo4j/[project page] and
4170
- the reference documentation.
4169
+ technologies, refer to the https://projects.spring.io/spring-data-neo4j/[reference
4170
+ documentation] .
4171
4171
4172
4172
4173
4173
0 commit comments