spring-data Getting started with spring-data

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9


Modern software applications have the option of storing data in more than one type of data store. Whereas traditional data stores like Relational databases remain popular, NoSQL databases and Cloud-based storage have also become commonplace. Each of these types of data stores has its own strengths and is therefore suited for different types of business use cases. Complex business applications therefore end up utilizing more than one type of data store to make data storage, retrieval and presentation operations more efficient. This presents the challenge of application programmers having to deal with the complexity of understanding the API provided by multiple data stores and using these API appropriately in their business applications.

Spring Data is a project that aims at providing a consistent, easy-to-use API to application programmers, independent of the underlying data store used. It combines the power of the Spring framework with concepts from proven data access paradigms such as domain-driven design to provide a familiar and consistent foundation to application programmers for accessing different types of data stores, while still retaining the specifics of an underlying data store, where appropriate.

The Spring Data project consists of several subprojects that can be used as libraries for accessing specific types of data stores. The full set of data stores supported by Spring Data and its subprojects can be obtained from the main page of the project.

Installation or Setup

Spring Data is a project consisting of a number of subprojects. The most common ones are Spring Data JPA, Spring Data MongoDB, Spring Data Elasticsearch, Spring Data Neo4J, Spring Data Cassandra and Spring Data Redis.

Unless you are developing your own subproject based upon Spring Data, it is highly unlikely that you will need to use it directly in your application. See the individual subprojects for details on their installation and setup. If however, you do have the need to use Spring Data in your application directly, the following instructions will be helpful.

Using Maven


Using Gradle

dependencies {
  compile 'org.springframework.data:spring-data-commons:[version-number]'

Substitute [version number] with the Spring Data version you wish to use.

Got any spring-data Question?