Spring Data JPA Tutorial

Creating repositories that use the Java Persistence API is a cumbersome process that takes a lot of time and requires a lot of boilerplate code.

We can remove some boilerplate code by creating an abstract base repository class that provides CRUD operations for our entities. This means that we can create concrete repositories by extending that base repository class. In other words, we have to write the code that provides CRUD operations only once.

The problem is that this does not eliminate all boilerplate code. We still have write the code that creates our database queries and invokes them. To make matters worse, we have to do this every time when we create a new database query.

Spring Data JPA Tutorial: Auditing, Part Two describes how you can add the information of the authenticated user, who created and/or updated an entity, into your entities by using the auditing infrastructure of Spring Data JPA.

Using jOOQ with Spring helps you to get back in control of your SQL. If you are tired of solving ORM related performance problems, you should do yourself a favor and read this tutorial.

Other Resources

This section showcases useful material created by other developers. If you have written a blog post or recorded a video about Spring Data JPA, and want to include it to this section, ping me on Twitter and I will check it out. If I think that it is useful, I will add it to this section.