Skip to content

Spring Lemon Commons JPA Guide

Sanjay Patel edited this page Nov 19, 2018 · 3 revisions

spring-lemon-commons-jpa includes spring-lemon-commons-web and adds Spring Data JPA to it. It comes with a couple of features, discussed below.

LemonEntity

LemonEntity is a base JPA entity class, with support for auditing, optimistic locking, and permission evaluation. When you need any of these features in an entity, inherit that from this one.

How to execute some code only after successful commit

Sometimes you'll need to execute some code only after a successful database commit. For example, you should send verification mail to a user only after his registration data is committed to the database. Use LecjUtils.afterCommit method in such cases.

Clone this wiki locally