Logging Guide for Hibernate 4, 5 & 6 – Use the right config for dev and prod
|

Logging Guide for Hibernate 4, 5 & 6 – Use the right config for dev and prod

Choosing the right logging configuration can make the difference between finding a performance issue during development or suffering from it on production. But it can also create an overhead that slows down your application. You need to decide which information you need and configure your system accordingly. I, therefore, prefer to use two different configurations:…

FlushMode in JPA and Hibernate – What it is and how to change it

FlushMode in JPA and Hibernate – What it is and how to change it

The FlushMode defines when new entities and your changes on existing ones get written to the database. This might seem like a simple and obvious mechanism. But I recognized in my Q&A calls that it often causes some confusion because, by default, Hibernate doesn’t perform a flush when you call the persist method on your EntityManager, or the save method on your…

The Best Spring Data JPA Logging Configuration in Spring Boot

The Best Spring Data JPA Logging Configuration in Spring Boot

Spring Data JPA’s repositories provide most of the database operations for you. That makes working with Spring Data JPA very comfortable but it also increases the importance of a good logging configuration. If you don’t implement your database operations yourself, you at least need to make sure that you know which operations get performed. The…