forked from eugenp/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* BAEL-6625 - spring data neo4j example * BAEL-6625 - spring data neo4j example * BAEL-6625 - optimized imports * BAEL-6625 - moving project to jdk9 and above * BAEL-6625 - changing test names
- Loading branch information
Showing
24 changed files
with
257 additions
and
766 deletions.
There are no files selected for viewing
178 changes: 0 additions & 178 deletions
178
persistence-modules/neo4j/src/test/java/com/baeldung/neo4j/Neo4jLiveTest.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...ules/spring-data-neo4j/src/main/java/com/baeldung/spring/data/neo4j/Neo4JApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.baeldung.spring.data.neo4j; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class Neo4JApplication { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(Neo4JApplication.class, args); | ||
} | ||
} |
26 changes: 0 additions & 26 deletions
26
.../src/main/java/com/baeldung/spring/data/neo4j/config/MovieDatabaseNeo4jConfiguration.java
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
.../main/java/com/baeldung/spring/data/neo4j/config/MovieDatabaseNeo4jTestConfiguration.java
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
...es/spring-data-neo4j/src/main/java/com/baeldung/spring/data/neo4j/config/Neo4jConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.baeldung.spring.data.neo4j.config; | ||
|
||
import org.neo4j.cypherdsl.core.renderer.Dialect; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class Neo4jConfig { | ||
@Bean | ||
org.neo4j.cypherdsl.core.renderer.Configuration cypherDslConfiguration() { | ||
return org.neo4j.cypherdsl.core.renderer.Configuration.newConfig() | ||
.withDialect(Dialect.NEO4J_5).build(); | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
...modules/spring-data-neo4j/src/main/java/com/baeldung/spring/data/neo4j/domain/Author.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.baeldung.spring.data.neo4j.domain; | ||
|
||
|
||
import org.springframework.data.neo4j.core.schema.Id; | ||
import org.springframework.data.neo4j.core.schema.Node; | ||
import org.springframework.data.neo4j.core.schema.Relationship; | ||
|
||
import java.util.List; | ||
|
||
@Node("Author") | ||
public class Author { | ||
@Id | ||
private Long id; | ||
|
||
private String name; | ||
|
||
@Relationship(type = "WRITTEN_BY", direction = Relationship.Direction.INCOMING) | ||
private List<Book> books; | ||
|
||
public Author(Long id, String name) { | ||
this.id = id; | ||
this.name = name; | ||
} | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public List<Book> getBooks() { | ||
return books; | ||
} | ||
|
||
public void setBooks(List<Book> books) { | ||
this.books = books; | ||
} | ||
} |
Oops, something went wrong.