What problem does it solve?
Provides clear patterns and actionable guidance to integrate Neo4j graph databases with Spring applications, reducing boilerplate and preventing common modeling and query mistakes when working with nodes, relationships, and repositories.
Core Features & Use Cases
- Setup & Configuration: How to add the dependency, configure spring.neo4j connection properties, and set the Cypher-DSL dialect.
- Entity & Relationship Mapping: Best practices for @Node, @Id strategies (business key vs generated), @Relationship, @Property and immutable entities.
- Repository Patterns: Using Neo4jRepository and ReactiveNeo4jRepository, query derivation, and custom @Query Cypher usage.
- Reactive vs Imperative: Guidance on choosing and isolating reactive and blocking approaches and their runtime requirements.
- Testing & Tooling: How to test repositories with Neo4j Harness, use @DataNeo4jTest, and provide fixtures for integration tests.
- Real-world Use Case: Model a movie database or social network where entities, relationship properties, custom queries, and projections are required for efficient reads and writes.
Quick Start
Add the spring-boot-starter-data-neo4j dependency to your Spring Boot project and configure spring.neo4j.uri, username, and password to connect and begin defining @Node entities and repositories.