You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4527,9 +4527,10 @@ Each will be called in order with the `ConfigBuilder` that is used to build the
4527
4527
[[boot-features-spring-data-neo4j-repositories]]
4528
4528
==== Spring Data Neo4j Repositories
4529
4529
Spring Data includes repository support for Neo4j.
4530
+
For complete details of Spring Data Neo4j, refer to the {spring-data-neo4j-docs}[reference documentation].
4530
4531
4531
4532
Spring Data Neo4j shares the common infrastructure with Spring Data JPA as many other Spring Data modules do.
4532
-
You could take the JPA example from earlier and define `City` as Neo4j OGM `@NodeEntity` rather than JPA `@Entity` and the repository abstraction works in the same way, as shown in the following example:
4533
+
You could take the JPA example from earlier and define `City` as Spring Data Neo4j `@Node` rather than JPA `@Entity` and the repository abstraction works in the same way, as shown in the following example:
4533
4534
4534
4535
[source,java,indent=0]
4535
4536
----
@@ -4547,9 +4548,10 @@ You could take the JPA example from earlier and define `City` as Neo4j OGM `@Nod
4547
4548
----
4548
4549
4549
4550
The `spring-boot-starter-data-neo4j` "`Starter`" enables the repository support as well as transaction management.
4550
-
You can customize the locations to look for repositories and entities by using `@EnableNeo4jRepositories` and `@EntityScan` respectively on a `@Configuration`-bean.
4551
+
Spring Boot supports both classic and reactive Neo4j repositories, using the `Neo4jTemplate` or `ReactiveNeo4jTemplate` beans.
4552
+
When Project Reactor is available on the classpath, the reactive style is also auto-configured.
4551
4553
4552
-
TIP: For complete details of Spring Data Neo4j, including its object mapping technologies, refer to the {spring-data-neo4j-docs}[reference documentation].
4554
+
You can customize the locations to look for repositories and entities by using `@EnableNeo4jRepositories` and `@EntityScan` respectively on a `@Configuration`-bean.
4553
4555
4554
4556
4555
4557
@@ -7152,7 +7154,7 @@ If, however, you prefer to run tests against a real MongoDB server, you should e
You can use `@DataNeo4jTest` to test Neo4j applications.
7155
-
By default, it uses an in-memory embedded Neo4j (if the embedded driver is available), scans for `@NodeEntity` classes, and configures Spring Data Neo4j repositories.
7157
+
By default, it scans for `@Node` classes, and configures Spring Data Neo4j repositories.
7156
7158
Regular `@Component` beans are not loaded into the `ApplicationContext`.
7157
7159
(For more about using Neo4J with Spring Boot, see "<<boot-features-neo4j>>", earlier in this chapter.)
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTest.java
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2012-2019 the original author or authors.
2
+
* Copyright 2012-2020 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -44,9 +44,8 @@
44
44
* Using this annotation will disable full auto-configuration and instead apply only
45
45
* configuration relevant to Neo4j tests.
46
46
* <p>
47
-
* By default, tests annotated with {@code @DataNeo4jTest} will use an embedded in-memory
48
-
* Neo4j process (if available). They will also be transactional with the usual
49
-
* test-related semantics (i.e. rollback by default).
47
+
* By default, tests annotated with {@code @DataNeo4jTest} are transactional with the
48
+
* usual test-related semantics (i.e. rollback by default).
50
49
* <p>
51
50
* When using JUnit 4, this annotation should be used in combination with
0 commit comments