# spring-projects/spring-data-examples architecture

> Architecture diagram of the GitHub repository spring-projects/spring-data-examples, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/spring-projects/spring-data-examples
- Repository: https://github.com/spring-projects/spring-data-examples

## Overview

Spring Data Examples is a multi-module collection of runnable samples demonstrating Spring Data APIs across stores and web integrations. The typical learning workflow is a developer choosing a sample, examining its domain and repository/template usage, and applying that pattern to a backing store or web service. The README documents the feature areas represented below; source excerpts are sparse, so edges describe only those documented relationships, not inferred calls between sample classes.

Main entry points: [`README.adoc`](https://github.com/spring-projects/spring-data-examples/blob/main/README.adoc) (Sample catalog), [`jdbc`](https://github.com/spring-projects/spring-data-examples/tree/main/jdbc) (JDBC samples), [`cassandra`](https://github.com/spring-projects/spring-data-examples/tree/main/cassandra) (Cassandra samples), [`elasticsearch`](https://github.com/spring-projects/spring-data-examples/tree/main/elasticsearch) (Elasticsearch samples)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_stores["Store examples"]
  node_cassandra["Cassandra samples"]
  node_elasticsearch["Elasticsearch samples"]
  node_jpa["JPA samples"]
  node_mongodb["MongoDB samples"]
  node_redis["Redis samples"]
  node_r2dbc["R2DBC samples"]
  node_neo4j["Neo4j samples"]
  node_ldap["LDAP samples"]
end

subgraph group_jdbc["JDBC patterns"]
  node_jdbc_samples["JDBC samples"]
  node_jdbc_ids["ID generation"]
  node_jdbc_schema["Schema types"]
  node_jdbc_updates["Selective updates"]
end

subgraph group_web["Web integrations"]
  node_rest["Spring Data REST"]
  node_web_support["Spring Data web"]
end

subgraph group_misc["Other samples"]
  node_multi_store["Multi-store samples"]
  node_map_store["Map repositories"]
  node_bom_sample["Release train BOM"]
end

node_developer(("Developer"))
node_samples["Sample catalog<br/>[README.adoc]"]
node_datastores[("Backing stores")]
node_external_services["External services"]

node_developer -->|"browses"| node_samples
node_samples -->|"showcases"| node_cassandra
node_samples -->|"showcases"| node_elasticsearch
node_samples -->|"showcases"| node_jpa
node_samples -->|"showcases"| node_mongodb
node_samples -->|"showcases"| node_redis
node_samples -->|"showcases"| node_jdbc_samples
node_samples -->|"showcases"| node_r2dbc
node_samples -->|"showcases"| node_neo4j
node_samples -->|"showcases"| node_ldap
node_samples -->|"showcases"| node_rest
node_samples -->|"showcases"| node_web_support
node_samples -->|"showcases"| node_multi_store
node_samples -->|"showcases"| node_map_store
node_samples -->|"shows usage"| node_bom_sample
node_jdbc_samples -->|"demonstrates"| node_jdbc_ids
node_jdbc_samples -->|"demonstrates"| node_jdbc_schema
node_jdbc_samples -->|"demonstrates"| node_jdbc_updates
node_cassandra -->|"uses Cassandra"| node_datastores
node_elasticsearch -.->|"requires local instance"| node_external_services
node_jpa -.->|"persists via JPA"| node_datastores
node_mongodb -->|"uses MongoDB"| node_datastores
node_redis -.->|"uses Redis"| node_external_services
node_jdbc_samples -.->|"persists with JDBC"| node_datastores
node_r2dbc -.->|"uses R2DBC"| node_datastores
node_neo4j -.->|"uses Neo4j"| node_datastores
node_ldap -.->|"accesses LDAP"| node_datastores
node_rest -.->|"exposes data services"| node_datastores
node_multi_store -->|"combines JPA and MongoDB"| node_datastores

click node_samples "https://github.com/spring-projects/spring-data-examples/blob/main/README.adoc"
click node_cassandra "https://github.com/spring-projects/spring-data-examples/tree/main/cassandra"
click node_elasticsearch "https://github.com/spring-projects/spring-data-examples/tree/main/elasticsearch"
click node_jpa "https://github.com/spring-projects/spring-data-examples/tree/main/jpa"
click node_mongodb "https://github.com/spring-projects/spring-data-examples/tree/main/mongodb"
click node_redis "https://github.com/spring-projects/spring-data-examples/tree/main/redis"
click node_jdbc_samples "https://github.com/spring-projects/spring-data-examples/tree/main/jdbc"
click node_jdbc_ids "https://github.com/spring-projects/spring-data-examples/tree/main/jdbc/howto/idgeneration"
click node_jdbc_schema "https://github.com/spring-projects/spring-data-examples/tree/main/jdbc/howto/schema-generation"
click node_jdbc_updates "https://github.com/spring-projects/spring-data-examples/tree/main/jdbc/howto/selectiveupdate"
click node_r2dbc "https://github.com/spring-projects/spring-data-examples/tree/main/r2dbc"
click node_neo4j "https://github.com/spring-projects/spring-data-examples/tree/main/neo4j"
click node_ldap "https://github.com/spring-projects/spring-data-examples/tree/main/ldap"
click node_rest "https://github.com/spring-projects/spring-data-examples/tree/main/rest"
click node_web_support "https://github.com/spring-projects/spring-data-examples/tree/main/web"
click node_multi_store "https://github.com/spring-projects/spring-data-examples/tree/main/multi-store"
click node_map_store "https://github.com/spring-projects/spring-data-examples/tree/main/map"
click node_bom_sample "https://github.com/spring-projects/spring-data-examples/tree/main/bom"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cassandra,node_elasticsearch,node_jpa,node_mongodb,node_redis,node_r2dbc,node_neo4j,node_ldap toneBlue
class node_jdbc_samples,node_jdbc_ids,node_jdbc_schema,node_jdbc_updates,node_datastores toneAmber
class node_rest,node_web_support toneMint
class node_multi_store,node_map_store,node_bom_sample toneRose
class node_developer,node_external_services toneIndigo
class node_samples toneTeal
```

## Components

### Store examples

- [Cassandra samples](https://github.com/spring-projects/spring-data-examples/tree/main/cassandra): `cassandra`
- [Elasticsearch samples](https://github.com/spring-projects/spring-data-examples/tree/main/elasticsearch): `elasticsearch`
- [JPA samples](https://github.com/spring-projects/spring-data-examples/tree/main/jpa): `jpa`
- [MongoDB samples](https://github.com/spring-projects/spring-data-examples/tree/main/mongodb): `mongodb`
- [Redis samples](https://github.com/spring-projects/spring-data-examples/tree/main/redis): `redis`
- [R2DBC samples](https://github.com/spring-projects/spring-data-examples/tree/main/r2dbc): `r2dbc`
- [Neo4j samples](https://github.com/spring-projects/spring-data-examples/tree/main/neo4j): `neo4j`
- [LDAP samples](https://github.com/spring-projects/spring-data-examples/tree/main/ldap): `ldap`

### JDBC patterns

- [JDBC samples](https://github.com/spring-projects/spring-data-examples/tree/main/jdbc): `jdbc`
- [ID generation](https://github.com/spring-projects/spring-data-examples/tree/main/jdbc/howto/idgeneration): `jdbc/howto/idgeneration`
- [Schema types](https://github.com/spring-projects/spring-data-examples/tree/main/jdbc/howto/schema-generation): `jdbc/howto/schema-generation`
- [Selective updates](https://github.com/spring-projects/spring-data-examples/tree/main/jdbc/howto/selectiveupdate): `jdbc/howto/selectiveupdate`

### Web integrations

- [Spring Data REST](https://github.com/spring-projects/spring-data-examples/tree/main/rest): `rest`
- [Spring Data web](https://github.com/spring-projects/spring-data-examples/tree/main/web): `web`

### Other samples

- [Multi-store samples](https://github.com/spring-projects/spring-data-examples/tree/main/multi-store): `multi-store`
- [Map repositories](https://github.com/spring-projects/spring-data-examples/tree/main/map): `map`
- [Release train BOM](https://github.com/spring-projects/spring-data-examples/tree/main/bom): `bom`

### Other components

- **Developer**
- [Sample catalog](https://github.com/spring-projects/spring-data-examples/blob/main/README.adoc): `README.adoc`
- **Backing stores**
- **External services**

## Connections

- Developer → Sample catalog: browses (evidence: `README.adoc`)
- Sample catalog → Cassandra samples: showcases (evidence: `README.adoc`)
- Sample catalog → Elasticsearch samples: showcases (evidence: `README.adoc`)
- Sample catalog → JPA samples: showcases (evidence: `README.adoc`)
- Sample catalog → MongoDB samples: showcases (evidence: `README.adoc`)
- Sample catalog → Redis samples: showcases (evidence: `README.adoc`)
- Sample catalog → JDBC samples: showcases (evidence: `README.adoc`)
- Sample catalog → R2DBC samples: showcases (evidence: `README.adoc`)
- Sample catalog → Neo4j samples: showcases (evidence: `README.adoc`)
- Sample catalog → LDAP samples: showcases (evidence: `README.adoc`)
- Sample catalog → Spring Data REST: showcases (evidence: `README.adoc`)
- Sample catalog → Spring Data web: showcases (evidence: `README.adoc`)
- Sample catalog → Multi-store samples: showcases (evidence: `README.adoc`)
- Sample catalog → Map repositories: showcases (evidence: `README.adoc`)
- Sample catalog → Release train BOM: shows usage (evidence: `README.adoc`)
- JDBC samples → ID generation: demonstrates (evidence: `README.adoc`)
- JDBC samples → Schema types: demonstrates (evidence: `README.adoc`)
- JDBC samples → Selective updates: demonstrates (evidence: `README.adoc`)
- Cassandra samples → Backing stores: uses Cassandra (evidence: `README.adoc`)
- Elasticsearch samples → External services: requires local instance (evidence: `README.adoc`)
- JPA samples → Backing stores: persists via JPA (evidence: `README.adoc`)
- MongoDB samples → Backing stores: uses MongoDB (evidence: `README.adoc`)
- Redis samples → External services: uses Redis (evidence: `README.adoc`)
- JDBC samples → Backing stores: persists with JDBC (evidence: `README.adoc`)
- R2DBC samples → Backing stores: uses R2DBC (evidence: `README.adoc`)
- Neo4j samples → Backing stores: uses Neo4j (evidence: `README.adoc`)
- LDAP samples → Backing stores: accesses LDAP (evidence: `README.adoc`)
- Spring Data REST → Backing stores: exposes data services (evidence: `README.adoc`)
- Multi-store samples → Backing stores: combines JPA and MongoDB (evidence: `README.adoc`)
