This tutorial series focuses on doing Persistence with Spring - illustrating examples with Hibernate, JPA and Spring Data.
1. Core Persistence
Setup Hibernate 3 with Spring - the Java and XML Configuration, integration with MySQL and usage best practices.
Setup Hibernate 4 with Spring - the Java and XML Configuration, how to use and best practices.
Setup JPA with Spring - the Java and XML Configuration, the Maven dependencies and a generic DAO example.
Spring Data JPA with Spring - how to remove the DAO implementation, manual and automatic custom queries, transactions with Spring Data and configuration.
2. The DAO
Implement a generic DAO with Hibernate in Spring.
How to implement the DAO with JPA in a Spring project.
How to simplify the Data Access Layer by using a single, generified DAO, which will result in elegant data access, with no unnecessary clutter.
3. Advanced Persistence
Transaction Configuration with Spring 4 and JPA - how to Enable and Configure Transactions and set up Transaction Propagation.
Hibernate Mapping Exception - Unknown Entity - causes and solutions.
How to Sort in JPA using JQL or the Criteria API.
Sort with Hibernate 4 using HQL or the Criteria API.
Pagination in JPA - how to use JQL and the Criteria API to do pagination correctly.
Pagination in Hibernate - using basic HQL, ScrollableResults as well as the more flexible and type-safe Criteria API.
Learn how to use CSV files to hold the Setup data for a Spring web application, and how to fully load and persist that data from disk.
How to use Liquibase to safely and maturely evolve the database schema of your Java app.
A step by step tutorial on integrating DynamoDB in Spring Boot application using Spring Data DynamoDB.
Look into the rollback feature – and how we can undo a Liquibase operation.
This article describes key concepts of Flyway and how we can use this framework to continuously remodel our application's database schema reliably and easily.
This article demonstrates three approaches to introducing auditing into an application: JPA, Hibernate Envers, and Spring Data JPA.
4. Spring Data MongoDB
A solid intro to using MongoDB in with Spring Data.
How to Query MongoDB with Spring Data: Query and Criteria, auto-generated repository methods, raw queries with the @Query annotation as well as QueryDSL.
How to work with Indexes, Converters and Common Annotations in Spring Data MongoDB.
How to implement a solid, generic cascading mechanism with lifecycle events in Spring Data MongoDB.
Other Spring Tutorials
How to build REST Services with Spring
Some of the most common exceptions in Spring with examples – why they occur and how to solve them quickly
The entire tutorial in based on this github project. Watch and fork it at will - the project can be used as a starting point for a full fledged implementation.