Loading...

Latest Posts

JPA June 28, 2023

How to Define an Index with Spring Data JPA

In this article, we will deal with the definition of indexes in Spring Data JPA and the Hibernate Framework. Our focus is on defining an index for a non-primary key and using the @Index annotation. The proper use of indexes plays a crucial role in optimizing the performance of your database, as they enable faster data queries and overall improve database performance. Defining an Index with the @Index Annotation With JPA and Hibernate, you can define indexes on entities and non-entity tables such as @SecondaryTable, @CollectionTable, and @JoinTable using the @Index annotation.


Performance June 16, 2023

How to Monitor Your Spring Boot Application with Spring Actuator and Micrometer

In the world of application development using Spring Boot, it’s crucial to focus not just on the development aspect but also on performance monitoring. In this extensive guide, we’ll explore the steps to set up monitoring for your Spring Boot application using Spring Actuator and Micrometer, and how to employ Prometheus and Grafana for effective metrics handling and visualization. Understanding Spring Boot Monitoring Monitoring forms an essential part of ensuring the health of an application.


Performance June 12, 2023

Goodbye Performance Issues: How Project Loom Eliminates Asynchrony

Anyone who develops a backend application with more than a handful of users knows that most performance problems are related to I/O. In modern web applications, these are typically network calls. Whether it’s REST requests to another service, queries to an external database, or communication with middleware. We handle all these cases - consciously or unconsciously - in asynchronous threads. This way, we no longer block the main thread. Doing this correctly is not trivial.


JPA January 21, 2023

Accessing Non-Final Property Name in Constructor With JPA

The implications of JPA always manage to surprise me. Yesterday a colleague of mine made me aware of a warning in IntelliJ. The conversation went like that: “Marcus, in your blog you explained that we should check constraints in the constructor instead of bean validation . Me: “yeah”. “I wanted to make it right, but when I do it in this entity IntelliJ warns me with Accessing non-final property name in constructor”.


Clean Code November 20, 2022

Don't confuse configuration and constants

From time to time I experience that an application is unnecessarily configurable. In a recent project I experienced how too many options lead me to feel much more complexity and increased my mental load. Looking deeper into some of the values I saw that these were actually constants that would be dangerous to change “on-the-fly” anyway. In this post I reflect on this and share my thoughts. In this project the backend processes data from an embedded devices that communicate through LPWA networks.


Top