Skip to content
CAI
Software that uses CAICheck a score

spring-projects/spring-data-rest

57.8

Adequate · 22 September 2026

25.2k

lines of production code

Java

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is Spring Data REST, a framework that automatically exposes Spring Data repositories as hypermedia-driven REST APIs. It provides comprehensive capabilities for configuring resource mappings, handling entity lookups, and managing HTTP method exposure, while supporting advanced features like projections, JSON Patch, and custom event handling. The system includes a HAL Explorer for API visualization and integrates with various data stores such as JPA and MongoDB, ensuring robust security and serialization across different environments.

How it got here

2012–2013 — Maven migration and REST API modernization

21 changes.

The project migrated its build system from Gradle to Maven and removed legacy Spring MVC implementation code in favor of standard auto-configuration. This period introduced comprehensive new APIs for repository event handling, URI resolution, and resource customization, significantly expanding the framework's configurability and extensibility.

2014–2016 — test infrastructure and coverage expansion

14 changes.

This period focused on building a comprehensive test infrastructure for Spring Data REST, including new base classes, test harnesses, and domain models for JPA, MongoDB, and security integrations. It also involved significantly expanding unit and integration test coverage for core web MVC components, JSON handling, event invokers, and utility classes to ensure robust behavior and edge case validation.

2019–2023 — HAL Explorer and documentation migration

7 changes.

This period focused on introducing the HAL Explorer module, enabling its support for GraalVM native images, and adding comprehensive test coverage. Concurrently, the project migrated its reference documentation to the Antora static site generator and updated the build infrastructure to use Spring Develocity Conventions.

Features

HAL Explorer module added to Spring Data REST

A new HAL Explorer module has been introduced, providing a web-based interface for exploring REST APIs. This includes a new \HalExplorer\ controller that handles redirects to the explorer's static content and a \HalExplorerConfiguration\ that registers the necessary static resource handlers and the controller bean, making the explorer available at the configured base path under the \/explorer\ route.

spring-data-rest-hal-explorer/src/main/java · high confidence

HAL Explorer now supports GraalVM native images

The HAL Explorer module can now be used in GraalVM native images. This is achieved by adding a native-image resource configuration that exposes the HAL Explorer static assets and registering the HalExplorerConfiguration via Spring factories, ensuring the resources are available and the configuration is loaded at runtime.

spring-data-rest-hal-explorer/src/main/resources · high confidence

Introduction of a new repository event system

Spring Data REST now provides a comprehensive event model for repository lifecycle operations. This change introduces a new \org.springframework.data.rest.core.event\ package containing base \RepositoryEvent\ classes (such as \BeforeSaveEvent\, \AfterCreateEvent\, and link-specific events) and two key listeners: \AbstractRepositoryEventListener\, which allows users to extend a base class to handle specific lifecycle phases, and \AnnotatedEventHandlerInvoker\, which enables declarative event handling via annotations like \@HandleBeforeSave\ on Spring beans. Additionally, \ValidatingRepositoryEventListener\ is provided to wire Spring \Validator\ instances to these events, allowing validation to be triggered automatically before or after save, create, or delete operations.

spring-data-rest-core/src/main/java/org/springframework/data/rest/core/event · high confidence

Migrate reference documentation to Antora

The Spring Data REST reference documentation has been migrated to the Antora static site generator. This change introduces a new site structure under src/main/antora/modules/ROOT, including a nav.adoc navigation file, an index page, and detailed content pages covering topics such as customizing Spring Data REST (URL paths, JSON output, CORS, event handling), integration, and conditional operations. Example code snippets are now linked via symlinks to the project's test sources, and the documentation now includes external links to the Javadoc and the Spring Data Commons wiki.

src/main/antora/modules/ROOT · high confidence

New HTTP method exposure configuration API

The mapping subsystem now introduces a dedicated configuration model for controlling which HTTP methods are exposed for repository resources. This includes the new \ExposureConfiguration\ and \ExposureConfigurer\ classes, which allow developers to register filters to customize supported methods for collection, item, and association resources, as well as disable PUT for creation. Supporting classes such as \ConfigurableHttpMethods\, \HttpMethods\, and \ConfigurationApplyingSupportedHttpMethodsAdapter\ provide the underlying mechanics for these filters, while \MappingResourceMetadata\ and \PersistentPropertyResourceMapping\ have been updated to respect the new \@RestResource\ exported flag and integration with this configuration system.

spring-data-rest-core/src/main/java/org/springframework/data/rest/core/mapping · high confidence

New JPA test fixtures and infrastructure for Spring Data REST integration tests

This change introduces a comprehensive set of JPA entity models, repositories, and supporting classes within the \spring-data-rest-tests-jpa\ module to serve as test fixtures. The additions include domain entities such as \Book\, \Author\, \Person\, \Order\, and \Guest\, along with their corresponding Spring Data repositories (e.g., \BookRepository\, \PersonRepository\). It also adds specific test infrastructure components like \BookIdConverter\ for custom ID handling, \AssignableSequenceStyleGenerator\ to support assigned identifiers in Hibernate, and \AuthorsController\ to demonstrate custom REST controller overrides. These files provide the necessary data layer and configuration for validating Spring Data REST behaviors, including projections, sorting, and custom resource mappings.

spring-data-rest-tests/spring-data-rest-tests-jpa/src/main · high confidence

New MapUtils utility for MultiValueMap conversion

Added a new MapUtils interface containing a toMap method that converts a MultiValueMap into a standard Map, providing a convenient utility for handling multi-valued map structures within the core module.

spring-data-rest-core/src/main/java/org/springframework/data/rest/core/util · high confidence

New annotations for repository customization and event handling

This release introduces a suite of new annotations in the core module to enhance repository configuration and lifecycle management. Developers can now use @RepositoryRestResource to customize REST export settings, including path segments, relation types, and descriptions for both collection and item resources, as well as define excerpt projections. Additionally, a comprehensive set of event-handling annotations (@HandleBeforeCreate, @HandleAfterSave, @HandleBeforeDelete, etc.) allows for granular control over repository events, while @RepositoryEventHandler marks classes as event listeners. The new @Description annotation provides a way to define semantic descriptions for resources, and the package is now marked with JSpecify nullability constraints.

spring-data-rest-core/src/main/java/org/springframework/data/rest/core/annotation · high confidence

New base URI handling infrastructure for Spring Data REST controllers

This change introduces a new set of classes in the webmvc module to manage base URI configuration and routing. It adds the @BasePathAwareController annotation to mark controllers that should have their request mappings augmented with a configured base URI, and the BasePathAwareHandlerMapping to implement this routing logic by prepending the base path to handler mappings. The BaseUri utility class provides methods to extract the repository lookup path from incoming requests and build URI components, while supporting classes like ControllerUtils, EmbeddedResourcesAssembler, HttpHeadersPreparer, and IncomingRequest provide foundational support for response generation, embedded resource handling, header preparation (including ETag and Last-Modified), and request inspection respectively.

spring-data-rest-webmvc/src/main · high confidence

New configuration APIs for entity lookups, projections, and metadata exposure

This change introduces several new configuration classes in the core config package to enhance customization of Spring Data REST behavior. Developers can now define custom entity lookups via the new \EntityLookupConfiguration\ and \EntityLookupRegistrar\ interfaces, allowing fine-grained control over how entities are resolved by their identifiers. Projection handling is improved with \ProjectionDefinitionConfiguration\ and the \@Projection\ annotation, enabling explicit registration and lookup of projection types by source and name. Metadata exposure is now configurable through \MetadataConfiguration\, which supports enabling/disabling ALPS documentation, registering JSON Schema formats, and defining custom formatting patterns. Additionally, \EnumTranslationConfiguration\ provides options to control how enum values are translated and parsed, and \RepositoryRestConfiguration\ integrates these new components while deprecating the older \ResourceMapping\ class in favor of \ResourceMappingConfiguration\.

spring-data-rest-core/src/main/java/org/springframework/data/rest/core/config · high confidence

New core abstractions for aggregate references and URI resolution

This release introduces new core types to improve how Spring Data REST handles entity references and validation. The new \AggregateReference\ interface and its \ResolvingAggregateReference\ implementation allow URIs to be resolved into aggregate identifiers or full entity instances, with support for extracting IDs from URI components. \AssociationAggregateReference\ extends this to support jMolecules DDD \Association\ types. \UriToEntityConverter\ has been updated to use \RepositoryInvoker\ directly for entity resolution, improving consistency. A new \ValidationErrors\ implementation provides better handling of nested property lookups and null values during validation. Additionally, a \Path\ utility class simplifies URI path construction and matching, and a \StringToLdapNameConverter\ enables conversion of strings to \javax.naming.ldap.LdapName\.

spring-data-rest-core/src/main/java/org/springframework/data/rest/core · high confidence

Support for custom entity lookup properties in REST resources

This change introduces the ability to customize the property used to generate URIs for entity resources. It adds the \EntityLookup\ SPI and \EntityLookupSupport\ base class, allowing developers to define a specific identifier property for an entity instead of relying solely on the datastore ID. The \DefaultSelfLinkProvider\ now uses these lookups to resolve the correct identifier for self-links, and \UnwrappingRepositoryInvokerFactory\ integrates with these lookups to handle entity retrieval, ensuring that resource exposure and link generation align with the custom lookup configuration.

spring-data-rest-core/src/main/java/org/springframework/data/rest/core/support · high confidence

Removals

Removal of legacy Spring Data REST MVC implementation

The legacy \org.springframework.data.rest.mvc\ package has been removed, deleting the core MVC components including \RepositoryRestController\, \RepositoryRestMvcConfiguration\, \RepositoryRestConfiguration\, and the custom \JsonView\ and \UriListView\ renderers. This change eliminates the previous manual Spring MVC wiring and view-based JSON serialization approach, requiring users to migrate to the current Spring Data REST auto-configuration and standard message converters.

rest · high confidence

Removal of legacy core utility classes and interfaces

The \Handler\ and \Link\ interfaces, along with the \SimpleLink\ implementation, have been removed from the \core\ package. Additionally, several utility classes in \core/util\—specifically \BeanUtils\, \FluentBeanDeserializer\, \FluentBeanSerializer\, \FluentBeanUtils\, and \UriUtils\—have been deleted, along with their associated test specifications and test resources. This cleanup eliminates internal helper code that is no longer required following the refactoring to standard Spring MVC conventions.

core · high confidence

Behavioural changes

Migrate build to Spring Develocity Conventions and update JVM configuration

The Maven build now uses the Spring Develocity Conventions extension (version 0.0.26) to connect to ge.spring.io for build analytics and optimization. Additionally, the JVM configuration has been updated to include specific exports and opens for JDK compiler modules and base libraries, ensuring compatibility with the new build conventions.

.mvn · high confidence

Project documentation and build tooling standardized

The repository now includes standardized project documentation files, specifically CONTRIBUTING.adoc, LICENSE.txt (Apache 2.0), and SECURITY.adoc, providing clear guidelines for contributors and security reporting. Additionally, the build tooling has been updated to include the Maven Wrapper (mvnw and mvnw.cmd) while removing the previous Gradle wrapper scripts (gradlew and gradlew.bat), shifting the primary build mechanism to Maven.

(repo-wide) · high confidence

Removal of JPA-specific repository metadata classes

The \JpaEntityMetadata\ and \JpaRepositoryMetadata\ classes in the repository module have been removed. These classes previously handled JPA-specific entity introspection and repository caching; their deletion indicates a shift away from this internal JPA metadata management within this module.

repository · high confidence

Removed Gradle wrapper configuration

The Gradle wrapper properties file has been deleted, removing the local configuration that previously managed the download and distribution of the Gradle build tool (specifically version 1.0-milestone-8). This change eliminates the project's ability to bootstrap a consistent Gradle environment automatically via the wrapper script.

gradle · high confidence

Test coverage

Added JPA integration tests for Spring Data REST web MVC controllers; Added MongoDB test domain models and repositories; Added integration and unit tests for the HAL Explorer module; Added integration tests for repository event dispatching and validation; Added integration tests for shop demo configuration and projections; Added security integration tests for Spring Data REST; Added test coverage for Spring Data REST core components; Added test domain models and repositories for Spring Data REST; Added test domain models for security integration tests; Added test fixtures for Spring Data REST shop domain; Added test resources for validation messages and logging configuration; Added unit and integration tests for Spring Data REST webmvc configuration; Added unit and integration tests for resource mapping and exposure configuration; Added unit tests for AnnotatedEventHandlerInvoker; Added unit tests for JSON Patch operations; Added unit tests for JSON serialization and deserialization components; Added unit tests for Spring Data REST webmvc components; Added unit tests for UriUtils path segment discovery; Added unit tests for ValueInstantiatorCustomizerRuntimeHints; Added unit tests for projection configuration and resource mapping; Added unit tests for webmvc support classes; New test harness and base classes for Spring Data REST integration tests.

Dependencies

Migrate build system from Gradle to Maven and update dependencies

The project build system has been migrated from Gradle to Maven, replacing the previous Gradle wrapper and build scripts with a multi-module Maven structure. This change updates the project version to 5.2.0-SNAPSHOT and upgrades key dependencies, including Hibernate to 7.4.9.Final, Spring Security to 7.0.0 for tests, and HAL Explorer to 2.3.0. The migration also introduces support for Jakarta EE APIs (Servlet 6.1, JPA 3.1) and integrates Antora for documentation generation.

(dependencies) · high confidence

Updated Maven Wrapper to version 3.9.16

The Maven Wrapper configuration has been updated to use Maven distribution version 3.9.16. This ensures that builds executed via the wrapper will consistently use this specific Maven version, aligning with the latest wrapper upgrade.

.mvn/wrapper · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 65 → 58 (-6.9)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 95 → 97 (+1.3)
  • Architecture 100 → 66 (-34.3)
  • Maturity 57 → 57 (+0.1)
  • Readiness 57 → 60 (+3.6)
  • Security 72 → 51 (-20.3)
  • Domain Modelling 100 → 89 (-10.8)

Resolved (42)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/alps/RootResourceInformationToAlpsDescriptorConverter.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/PersistentEntityResourceAssemblerArgumentResolver.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/WrappedJacksonProperties.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/WrappedJacksonProperties.java)
  • Duplicated block (11 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RootResourceInformation.java)
  • Duplicated block (11 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/MappedJacksonProperties.java)
  • Duplicated block (11 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java)
  • Duplicated block (11 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/WrappedJacksonProperties.java)
  • Duplicated block (12 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/Jackson2MappingAwareSortTranslator.java)
  • Duplicated block (12 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/Jackson2MappingAwareSortTranslator.java)
  • Duplicated block (12 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/MappedJacksonProperties.java)
  • Duplicated block (12 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java)
  • Duplicated block (13 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/MappedJacksonProperties.java)
  • Duplicated block (17 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java)
  • Duplicated block (5 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java)
  • Duplicated block (6 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java)
  • Duplicated block (7 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/Jackson2Metadata.java)
  • …and 22 more

New (233)

  • ClassTooLong: RepositoryRestMvcConfiguration (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.java)
  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no installation or build instructions (README.adoc)
  • Documentation: no usage examples (README.adoc)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/ResourceMetadataHandlerMethodArgumentResolver.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/Jackson2MappingAwareSortTranslator.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/Jackson2MappingAwareSortTranslator.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/Jackson2MappingAwareSortTranslator.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/Jackson2Metadata.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/Jackson2Metadata.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/Jackson2Serializers.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/MappedJacksonProperties.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java)
  • Duplicated block (10 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java)
  • Duplicated block (12 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/MappedJacksonProperties.java)
  • Duplicated block (12 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java)
  • Duplicated block (12 lines × 2) (spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/WrappedJacksonProperties.java)
  • …and 213 more

Changes since last survey

  • 13 commits — 13 feature/other, 0 fixes

By area

  • (root) — 6 commits
  • (repo) — 2 commits
  • spring-data-rest-webmvc/src — 2 commits
  • .github/workflows — 1 commit
  • .mvn/extensions.xml — 1 commit
  • src/main — 1 commit

Notable commits

  • change: Add release train automation.
  • change: Enter rampdown phase for 5.2.0-M1.
  • change: Enter rampdown phase for 5.2.0-M2.
  • change: Prepare next development iteration.
  • change: Prevent JSON Patch requests from overriding identifier and version properties.
  • change: Prevent PUT requests from overriding identifier and version properties of immutable aggregates.
  • change: Release version 5.2.0-M1 (2026.1.0).
  • change: Update Maven extensions.
  • change: Update build config for correct notice and license.txt inclusion.
  • change: Upgrade to Hibernate 7.4.5.Final.
  • change: Upgrade to Hibernate 7.4.7.Final.
  • change: Upgrade to Hibernate 7.4.8.Final.
  • change: Upgrade to Hibernate 7.4.9.Final.

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

spring-projects/spring-data-rest was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 22 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 48d431e09466e2f7d02ab675f2bafa6c1bae10a8 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-90d5d2fe38ee.