# spring-projects/spring-data-mongodb

Provides support to increase developer productivity in Java when using MongoDB. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.

Repository: https://github.com/spring-projects/spring-data-mongodb
Canonical: https://ross.abutalabs.com/products/spring-data-mongodb
Homepage: https://spring.io/projects/spring-data-mongodb/
Language: Java
License: Apache-2.0
License Family: permissive
Topics: ddd, java, mongodb, spring, spring-data, framework
Last push: 2026-08-21T09:05:07+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 98, longevity 100
- inputs: {"age_days": 5439, "days_push": 12, "days_rel": 12, "gap_med": 0.0, "n_releases_24m": 51}
- flags: no_readme
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1684, forks 1137 (observed 2026-08-28T04:05:21.969994+00:00)

## What it is
Spring Data MongoDB is part of the Spring Data umbrella, providing integration between Java applications and the MongoDB document database. It offers MongoTemplate, an annotation-driven object mapper, repository interfaces, transaction support, client-side field level encryption, and GridFS large file storage within a consistent Spring programming model.

## Use cases
- map Java objects to MongoDB documents with an annotation-driven object mapper
- use repository interfaces for MongoDB data access with custom queries and aggregations
- run multi-document transactions against MongoDB from a Spring application
- store and retrieve large files in MongoDB using GridFS
- encrypt sensitive fields client-side before storing them in MongoDB
- write type-safe MongoDB queries with Querydsl
- use MongoDB from Kotlin with Spring extensions

## When to choose
- you are building a Spring or Spring Boot application backed by MongoDB
- you want repository-style data access and familiar Spring idioms for a document database
- you need MongoDB features like transactions, GridFS, or field-level encryption in Java

## When to avoid
- you use a relational database or a non-MongoDB datastore (choose the matching Spring Data module)
- you are not using the Spring ecosystem and prefer the raw MongoDB Java driver
- you need a lightweight app without framework dependencies

## Facets
- artifact type: framework
- maturity: active
- function: orm, database-driver, database
- domain: databases, backend, developer-tools
- platform: jvm, cross-platform
- tags: mongodb, spring-data, object-mapping, repositories, gridfs, transactions, kotlin

## Member repositories
- spring-projects/spring-data-mongodb (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:21.969994+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:41:17.443135+00:00, confidence not recorded.
  - homepage: https://spring.io/projects/spring-data-mongodb/ (fetched 2026-08-29T11:14:04.859778+00:00, sha 46967b513be8)
  - site_page: https://spring.io/quickstart (fetched 2026-08-29T11:14:04.870898+00:00, sha fc64dd950363)
  - site_page: https://spring.io/projects/spring-restdocs (fetched 2026-08-29T11:14:04.874400+00:00, sha 1e2a101b77d3)
  - site_page: https://enterprise.spring.io (fetched 2026-08-29T11:14:04.868859+00:00, sha 85ac7d6d5114)
  - site_page: https://enterprise.spring.io/lts-releases (fetched 2026-08-29T11:14:04.872695+00:00, sha 3251cc8760b6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
