Don't Pollute Your Spring Boot Main EntryPoint Class

Don't Pollute Your Spring Boot Main EntryPoint Class

Most Spring Boot applications start with a beautifully boring main class.

Then one day we need caching. We add @EnableCaching.

Then we need async processing. We add @EnableAsync.

Then scheduling. Then JPA auditing. Then maybe something else.

Before we know it, the main class has become the place where every framework feature goes to live.

At first glance, this feels harmless. The application starts. The feature works. Everybody moves on.

This works great… until a slice test gets involved.

Let’s look at why adding every @EnableXXX annotation to the Spring Boot main class can make your tests more fragile, and what I prefer to do instead.

The Power of Value Objects

The Power of Value Objects

A Value Object is a domain concept defined by its values rather than by identity. For example, we can represent EventId, EventCode or Email as a value object. In this article, let’s explore the benefits of using value objects over primitive types.

Mastering Spring Boot in 5 Stages

Mastering Spring Boot in 5 Stages

Spring Boot is the most popular framework in the Java world to build enterprise applications. Also, Spring Boot is the most sought-after skill to get hired as a Java developer.

Here is my recommended approach to learn Spring Boot.