A lightweight Java library for auditing object changes, providing object diffs and a version history of your data objects.
spring-projects/spring-data-jpa
Spring Data JPA provides repository interfaces for JPA-based data access in Spring applications, generating implementations from method names and queries.
- Stars
- 3,296
- Forks
- 1,585
- Open issues
- 120
- Last commit
- 2 days ago
What is it?
Spring Data JPA is a module in the Spring Data family that simplifies building the data access layer of Java applications using the Java Persistence API. You declare repository interfaces, including custom finder methods, and Spring supplies the implementation at runtime, so developers write less boilerplate for CRUD operations, queries, and pagination.
The library generates queries from repository method names, can trigger JPA NamedQueries from query methods, and provides base classes for domain entities. It also supports transparent auditing of created and last-changed fields, and lets you plug custom repository code into generated repositories.
It integrates with the Spring Framework through a custom configuration namespace and annotations such as @EnableJpaRepositories. Build tooling uses Maven, and building from source requires JDK 17 or later.
Key features
- 01Generates CRUD method implementations for JPA entities
- 02Creates queries from repository method names
- 03Triggers JPA NamedQueries from query methods
- 04Provides domain base classes and transparent auditing of created and changed fields
- 05Allows custom repository code to be integrated
Use cases
- Building Spring Boot services that persist entities with a relational database through JPA
- Replacing hand-written DAO boilerplate with declarative repository interfaces
- Adding pagination and custom finder methods to an existing JPA data layer
Quick start
- 1
Add the Maven dependency spring-data-jpa to your project
<dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-jpa</artifactId> <version>${version}</version> </dependency> - 2
Define a repository interface extending CrudRepository and configure JPA with @EnableJpaRepositories
Things to know
- Requires a JDK 17 or above to build from source.
In collections
Topics
FAQ
- What is spring-data-jpa?
- Spring Data JPA provides repository interfaces for JPA-based data access in Spring applications, generating implementations from method names and queries. Spring Data JPA is a module in the Spring Data family that simplifies building the data access layer of Java applications using the Java Persistence API. You declare repository interfaces, including custom finder methods, and Spring supplies the implementation at runtime, so developers write less boilerplate for CRUD operations, queries, and pagination.
- Is spring-data-jpa free to use? What license does it have?
- spring-data-jpa is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is spring-data-jpa still maintained?
- Actively maintained. The last commit to spring-data-jpa was on Nov 5, 2026.
- What can I use spring-data-jpa for?
- Building Spring Boot services that persist entities with a relational database through JPA Replacing hand-written DAO boilerplate with declarative repository interfaces Adding pagination and custom finder methods to an existing JPA data layer
- How do I install spring-data-jpa?
- Add the Maven dependency spring-data-jpa to your project: <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-jpa</artifactId> <version>${version}</version> </dependency> Define a repository interface extending CrudRepository and configure JPA with @EnableJpaRepositories
- Where can I get spring-data-jpa?
- The source code and installation instructions are on GitHub: https://github.com/spring-projects/spring-data-jpa
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
An opinionated Java framework for building production-grade, Spring-powered applications and services with minimal setup.
Spring Security is a Java security framework for authentication, authorization and protection against common attacks in Spring applications.
TypeScript ORM for Node.js that gives type-safe database access across PostgreSQL, MySQL, SQLite, MongoDB and other databases.
A full-featured ORM for Go that maps structs to database tables and supports associations, hooks, transactions and migrations.
A TypeScript and JavaScript ORM for Node.js and other JS platforms, supporting both Active Record and Data Mapper patterns across many SQL and NoSQL databases.