Spring Data JPA @Modifying Annotation 1. Introduction In this short tutorial, we’ll learn how to create update queries with the Spring Data JPA @Query annotation. We’ll achieve this by using the @Modifying annotation. First, we’ll refresh our memory and see how to make queries using Spring Data JPA. After that,… Continue Reading spring-data-jpa-modifying-annotation

Handling NoClassDefFoundError for JAXBException in Java 9 1. Introduction For anyone who has tried upgrading to Java 9, they have likely experienced some sort of NoClassDefFoundError when compiling code that previously worked in earlier versions of Java. In this article, we’ll look at a common missing class, JAXBException, and different ways… Continue Reading java-9-jaxbexception

Spring Security Context Propagation with @Async 1. Introduction In this tutorial, we are going to focus on the propagation of the Spring Security principal with @Async. _ _ By default, the Spring Security Authentication is bound to a ThreadLocal – so, when the execution flow runs in a new thread… Continue Reading spring-security-async-principal-propagation

Auditing with JPA, Hibernate, and Spring Data JPA 1. Overview In the context of ORM, database auditing means tracking and logging events related to persistent entities, or simply entity versioning. Inspired by SQL triggers, the events are insert, update and delete operations on entities. The benefits of database auditing are… Continue Reading database-auditing-jpa