Getting started with spring-data

Download spring-data eBook

Remarks

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

<dependencies>
  <dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-commons</artifactId>
    <version>[version-number]</version>
  </dependency>
</dependencies>
 

Using Gradle

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

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

Stats

73 Contributors: 3
Wednesday, August 2, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook