Home » spring data

Tag Archives: spring data

Spring Form Validation Example

In this example, we will show how to implement server-side form validation in a Spring MVC application. 1. Introduction Form validation is a basic requirement for web applications that accept data as input. For example, you may want to ensure that an email address or credit card number sent in a request is valid before processing the data. There are ...

Read More »

Hibernate Foreign Key Example

1. Introduction In this post, we feature a comprehensive Example on Hibernate Foreign Key. Foreign key refers to single column or group of columns in table that link data present in another table through its primary key. A Foreign key can’t exist without its parent key but viceversa is not true. Example – A Menu can have submenus. It can ...

Read More »

Spring Data GemFire Tutorial

Welcome to the Spring Data GemFire tutorial. GemFire is a product from Pivotal. Pivotal Gemfire is an in-memory data grid powered by Apache Geode. Here is a quote from the Pivotal GemFire documentation: Pivotal GemFire is a data management platform that provides real-time, consistent access to data-intensive applications throughout widely distributed cloud architectures. GemFire pools memory, CPU, network resources, and ...

Read More »

Spring Data JPARepository Example

1. Introduction Spring Data is a part of Spring Framework. It simplifies the data access process for both relational and non-relational databases. Java Persistence API (JPA) is Java’s standard API specification for object-relational mapping. Spring Data JPA is a part of Spring Data and it supports Hibernate 5, OpenJPA 2.4, and EclipseLink 2.6.1. Spring Data repository significantly reduces the amount of boilerplate code required to implement data access layers ...

Read More »

Spring Data JPA Example

The goal of Spring Data repository abstraction is to significantly reduce the amount of boilerplate code required to implement data access layers for various persistence stores. If we try to implement a data access layer of an application on our own, we will end up with lots of boilerplate code. Spring provides JPA module which not only eliminates boilerplate code ...

Read More »

Spring Data Elasticsearch Example

Elasticsearch is a highly scalable open-source which can be used for data store, text search and analytics engine. Every instance of ElasticSearch is called a node and several nodes can be grouped together in a cluster. In this article, we will see how we can use spring-data-elasticsearch module which integrates spring-data and elasticsearch.             1. Dependencies Include <spring-core>, <spring-context> and <spring-data-elasticsearch> ...

Read More »

Spring Data Redis Example

In the past few examples, we have been integrating Spring Data with the NoSql Databases. In this example, we shall integrate Spring Data with Redis, a key-value based NoSQL Database. Spring Data offers a level of abstraction over the traditional way of executing query by exposing a Repository. As such, the user need not write queries and call specific methods, ...

Read More »

Spring data tutorial for beginners

In this example, we shall demonstrate how to configure Spring Framework to communicate with database using JPA and Hibernate as the JPA vendor. The benefits of using Spring Data is that it removes a lot of boiler-plate code and provides a cleaner and more readable implementation of DAO layer. Also, it helps make the code loosely coupled and as such ...

Read More »