A Collection of Spring Tutorials Persistence REST Security Series Spring Hibernate JPA I started the REST Security project on GitHub to explore writing an elegant REST Services with the latest and greatest Spring had to offer. That was Spring 3.1 and now Spring 3.2, moving towards Spring 4.0 and 4.1.… Continue Reading this-is-not-your-fathers-spring-a-learning-project

Proxy in Hibernate load() Method 1. Overview In this tutorial, we’ll see what a proxy is in the context of Hibernate’s load() method. For readers new to Hibernate, consider getting familiar with basics first. 2. A Brief Introduction To Proxies and load() method By definition, a proxy is “a function authorized… Continue Reading hibernate-proxy-load-method

Hibernate Mapping Exception – Unknown Entity 1. The Problem This article is going to discuss the org.hibernate.MappingException: Unknown entity issue and solutions, both for Hibernate as well as for a Spring and Hibernate environment. Further reading: Bootstrapping Hibernate 5 with Spring A quick and practical guide to integrating Hibernate 5… Continue Reading hibernate-mappingexception-unknown-entity

Hibernate Inheritance Mapping 1. Overview Relational databases don’t have a straightforward way to map class hierarchies onto database tables. To address this, the JPA specification provides several strategies: MappedSuperclass – the parent classes, can’t be entities Single Table – the entities from different classes with a common ancestor are placed… Continue Reading hibernate-inheritance

Simplify the DAO with Spring and Java Generics 1. Overview This article will focus on simplifying the DAO layer by using a single, generified Data Access Object for all entities in the system, which will result in elegant data access, with no unnecessary clutter or verbosity. We’ll build on the… Continue Reading simplifying-the-data-access-layer-with-spring-and-java-generics

Introduction to Hibernate Spatial 1. Introduction In this article, we’ll have a look a the spatial extension of Hibernate, hibernate-spatial. Starting with version 5, Hibernate Spatial provides a standard interface for working with geographic data. 2. Background on Hibernate Spatial Geographic data includes representation of entities like a Point, Line,… Continue Reading hibernate-spatial

Hibernate Validator Specific Constraints 1. Overview In this tutorial, we’re going to review Hibernate Validator constraints, which are built into Hibernate Validator but are outside the Bean Validation spec. For a recap of Bean Validation, please refer to our article on Java Bean Validation Basics. 2. Hibernate Validator Setup At the very… Continue Reading hibernate-validator-constraints