Skip to content

Commit 5506d97

Browse files
committed
Polish "Fix and improve Neo4j related documentation"
Closes gh-14548
1 parent 8a53adf commit 5506d97

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4045,17 +4045,19 @@ the Mongo instance's configuration and logging routing.
40454045
[[boot-features-neo4j]]
40464046
=== Neo4j
40474047
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`".
40514052

40524053

40534054

40544055
[[boot-features-connecting-to-neo4j]]
40554056
==== 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`:
40594061

40604062
[source,java,indent=0]
40614063
----
@@ -4084,15 +4086,14 @@ properties, as shown in the following example:
40844086
spring.data.neo4j.password=secret
40854087
----
40864088

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.
40904092

40914093

40924094

40934095
[[boot-features-connecting-to-neo4j-embedded]]
40944096
==== Using the Embedded Mode
4095-
40964097
If you add `org.neo4j:neo4j-ogm-embedded-driver` to the dependencies of your application,
40974098
Spring Boot automatically configures an in-process embedded instance of Neo4j that does
40984099
not persist any data when your application shuts down.
@@ -4102,7 +4103,7 @@ not persist any data when your application shuts down.
41024103
As the embedded Neo4j OGM driver does not provide the Neo4j kernel itself, you have
41034104
to declare `org.neo4j:neo4j` as dependency yourself. Refer to
41044105
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.
41064107
====
41074108

41084109
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.
41164117
[NOTE]
41174118
====
41184119
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`.
41204121
====
41214122

41224123

41234124

41244125
[[boot-features-neo4j-ogm-session]]
41254126
==== Neo4jSession
4126-
41274127
By default, if you are running a web application, the session is bound to the thread for
41284128
the entire processing of the request (that is, it uses the "Open Session in View"
41294129
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
41664166
`@Configuration`-bean.
41674167

41684168
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].
41714171

41724172

41734173

0 commit comments

Comments
 (0)