Inside Spring Data's examples repository
Spring Data Example Projects
At a glance
- What is it?
- One folder per persistence module, 5,426 stars, 3,407 forks, and not a single tagged release. A look at what this repository is for, what its build badges actually report on, and why its fork count says more than its star count.
- Who is it for?
- The most useful thing to know about this repository is that it is a catalog, not a product. Nothing here needs to be trusted the way a library's compatibility promise needs to be trusted; the code can be as old as the feature it demonstrates, which is why a Redis sample pinned to a 5.0 container sits next to vector search samples for three different stores.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 81 days ago.
- What is it written in?
- Mainly Java, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Star history
- spring-projects/spring-data-examples5,424 ★ · +4
| Repository | 2026-10-08 | 2026-10-22 |
|---|---|---|
| spring-projects/spring-data-examples | 5.4k | 5.4k |
4 Stars in the last 14 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
A catalog rather than a library
The repository description is two words long: Spring Data Example Projects. The README opens by explaining the same thing in a sentence, that the repository contains example projects for the different Spring Data modules to showcase the API and how to use the features provided by the modules.
That is the whole pitch. There is no published artifact to install, no version compatibility promise, and no changelog to read. The repository exists so that a developer facing a Spring Data problem can open one folder and read working code that someone who works on Spring Data actually wrote.
The scale reflects how much that service gets used. The repository carries 5,426 stars and 3,407 forks under an Apache 2.0 license, with 25 open issues and a last recorded push on 2026-08-03. It is written in Java and is not archived.
The fork number deserves more attention than it usually gets, because a fork-to-star ratio of roughly sixty percent is unusual. Libraries that people depend on get starred and rarely forked. Repositories that people copy from get forked, because forking a whole monorepo to reach one folder is faster than downloading a zip and deleting everything else. Three thousand four hundred forks reads as a measure of copy volume rather than of contribution intent.
Notably, the repository lists no topics at all. For a project this visible, that omission means the metadata is set only to the extent the owning organization requires, and nothing about it is curated for discovery.
One folder per persistence store
The README organizes the samples by module, and the file tree confirms the shape. The top-level directories are the stores and the integration surfaces.
cassandra/
jdbc/
jpa/
mongodb/
redis/Alongside the obvious ones sit Cassandra, Elasticsearch, JDBC, JPA, LDAP, MongoDB, Neo4j, R2DBC, Redis, and REST, plus a web support folder, a Couchbase folder, a map folder, a multi-store folder, and a bill of materials folder.
That last group is where the README's framing and the tree stop matching exactly. The README says it has separate folders for the samples of individual modules, and that is true for most of the listing. But a multi-store folder is by definition not about a single module, and the tree's Couchbase, map, and bill of materials entries have no counterpart in the visible module headings. The README listing is an inventory a reader can trust as a starting point without treating it as exhaustive.
Where the README does comment on individual folders, the comments are unusually opinionated and useful. The JPA example folder is described as probably the project to have a look at first, with a pointer to a simple package for the most basic setup. The showcase folder under JPA is a refactoring demonstration of improving a plain JPA persistence layer, and it is documented as removing close to all of the implementation code, with instructions in a demo file.
That kind of guidance is the actual product here. Nobody needs a sample module with default configuration; what a reader needs is to be told which of forty folders answers their problem.
Reactive, ahead-of-time, and vectors: what the samples track
Reading across the folder list, three themes show up often enough to count as the current shape of the project.
The first is reactivity. Reactive samples appear for Cassandra, Elasticsearch, MongoDB, and Redis, and the MongoDB entry goes further, covering imperative and reactive Querydsl support as well as MongoDB 4.0 transaction support in a dedicated transactions folder. Reactive is no longer a side branch here; it is a parallel track through most modules.
The second is ahead-of-time processing. An `aot-optimization` folder appears under Cassandra, JDBC, JPA, and MongoDB, each described as using Ahead-Of-Time Repositories with that module. Native image concerns have moved from a single demonstration into a repeated pattern across four stores, and the JDBC module goes all the way to a GraalVM native image compilation sample.
The third is vector search, which appears for Cassandra, MongoDB, and JPA, with the JPA one naming hibernate-vector explicitly. Three stores carrying the same feature is a reasonable signal of where the module roadmap is heading.
Integration breadth is the other theme. The JDBC module includes dedicated folders for jOOQ, MyBatis, Immutables, and jMolecules, plus a single query loading demonstration and a how-to folder tied to a blog post series from 2021. The JPA module includes Eclipselink, Spring Security integration, Query by Example, multiple datasources, and Vavr collection types as query method return values. The MongoDB module includes GeoJSON, GridFS, text search, fluent API, linking, and repository metrics.
The 2021 blog post link is worth flagging on its own. A how-to folder still pointing at a four-year-old article is fine as a historical reference and less fine as current guidance, and nothing in the repository marks which it is meant to be.
Two build badges that disagree about the present
The README header carries two status badges, and they point at two different eras.
The newer one is a Develocity badge reading Revved up by Develocity, linking into Spring's build scans service. That is the current mechanism for showing build status in Spring projects, and it links into a scan search scoped to the example projects.
The older one is a Travis CI build status badge for the main branch, pointing at travis-ci.org.
$ docker run -p 6379:6379 redis:5.0The tree backs that badge up: there is a `.travis.yml` at the root. So the repository is configured for a continuous integration service that has not run publicly hosted builds for years, and simultaneously displays a badge pointing at a hosted build system that no longer offers public projects, while its genuinely current build signal sits in the adjacent badge.
Nothing here suggests the project is unmaintained. The last push is recent enough, the module coverage tracks current Spring Data work, and a sample set that ages is partly the point. What the two badges together do is leave a reader unable to tell, from the README alone, whether any of this code currently compiles. The honest answer is that an examples repository tells you how a feature was used, not that the sample still builds against the current release.
That distinction is sharpened by the version pins still sitting in the instructions. The Redis sample asks for a Redis 5.0 container to run its tests.
The Elasticsearch and Redis entries both carry an explicit warning that a local instance must be running before the tests will pass. Running a 5.0 container to exercise code written alongside much newer Spring Data releases is a mismatch the README does not comment on.
Why people fork it
The fork count explains the fork count.
Someone who needs the MongoDB aggregation framework example does not want the Cassandra vector search example, the JPA eclipselink sample, or the Redis streams sample. They want one folder, working, in their own repository where they can adapt it. Cloning and pruning is the path of least resistance, and that is what produces a repository with three thousand forks and twenty-five open issues.
The low issue count relative to the star count is consistent with that reading. A catalog of samples does not generate bug reports from users, because it has no users. It generates questions, and a question about a sample belongs in a discussion or a docs site rather than an issue tracker.
It also explains the absence of releases. There is nothing to release. The repository has no tagged versions at all, and the version that matters is whatever Spring Data release the samples were written against, which is stated per sample rather than pinned centrally. For a repository whose whole value is copying working code into your own project, that is a defensible design. It is also why the samples should be read as illustrations of an API at a moment in time rather than as a maintained surface with a support window.
For anyone arriving cold, the JPA module's own recommendation is the best starting signal in the repository: look at the JPA example folder first, then the simple package inside it, then move outward to the module that matches the store you actually use.
Editorial conclusion
The most useful thing to know about this repository is that it is a catalog, not a product. Nothing here needs to be trusted the way a library's compatibility promise needs to be trusted; the code can be as old as the feature it demonstrates, which is why a Redis sample pinned to a 5.0 container sits next to vector search samples for three different stores. The two build signals at the top of the README split cleanly: the Develocity link reflects scanning the way Spring projects do today, while the Travis badge and its .travis.yml describe a service that no longer runs public builds. And the fork ratio, 3,407 forks against 5,426 stars, is the clearest evidence of intent. People are not starring this to follow a release cadence. They are cloning the one folder that solves their problem, which is exactly what a maintained example catalog should want.
Frequently asked questions
Which is better, Spring data JDBC or JPA?
This repository does not answer that, and it is not trying to. It ships both side by side: a jdbc folder with basic usage, GraalVM native, jOOQ, MyBatis, Immutables, jMolecules and single query loading samples, and a jpa folder with plain, eclipselink, security, query by example, multiple datasources and vavr samples. The JPA example folder is labelled as probably the one to look at first, which is a hint about where to start reading rather than a verdict on which to use.
What does the spring-data-examples repository actually contain?
Example projects for the individual Spring Data modules, organised one folder per store. The file tree covers cassandra, couchbase, elasticsearch, jdbc, jpa, ldap, map, mongodb, multi-store, neo4j, r2dbc, redis, rest and web, plus a bom folder and a Maven wrapper. Nothing is published as a library; the point is to read working sample code.
Do the Spring Data examples come with releases or version tags?
No. The repository has no releases and no tagged versions at all. It is a catalog of sample projects rather than a shipped artifact, so the relevant version is whichever Spring Data release each individual sample was written against. That makes the code best read as an illustration of an API at a point in time, not as a surface with a support window.
What do I need running before the Spring Data example tests pass?
It depends on the folder. The Elasticsearch samples need a local Elasticsearch instance running, and the Redis samples need local Redis instances. The README suggests starting Redis with docker run -p 6379:6379 redis:5.0 in a separate terminal, and warns to shut it down afterwards. Note that the pinned 5.0 image tag is considerably older than the Spring releases the samples target.
Which newer Spring Data features do the examples cover?
Three themes repeat across modules. Ahead-of-Time Repositories have an aot-optimization folder under cassandra, jdbc, jpa and mongodb, with the jdbc one going as far as GraalVM native image compilation. Reactive samples appear for cassandra, elasticsearch, mongodb and redis. Vector search samples exist for cassandra, mongodb and jpa, with the JPA one naming hibernate-vector.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/spring-projects-spring-data-examples)Star history chart for your README
[](https://hysenlabs.com/projects/spring-projects-spring-data-examples)