How to Log Correctly in Java

Today's lesson: logging. I know, I know. "It's just printing stuff." Sure. And a forest fire is "just a candle". Let's talk.
A framework for building production-ready Spring applications quickly.
View All Tags
Today's lesson: logging. I know, I know. "It's just printing stuff." Sure. And a forest fire is "just a candle". Let's talk.

So you've discovered the magical world of @Transactional, @Async, @Cacheable, and their friends? Wonderful. You're living in the future now.
Under the hood, Spring AOP works by wrapping your beans in proxy objects. Those fancy annotations only fire when a call passes through that proxy. Break the rules and Spring silently does nothing: no error, no warning, just broken behavior at 2 AM while your on-call phone buzzes and the server fans spin up to jet engine levels.

Or how I learned from my silly mistakes when creating myself a common Maven dependency.

The quickest, cleanest, and easiest way to handle exceptions for requests in Spring Boot like a professional programmer in enterprises (or at least look like one).

This tutorial shows how to use P6Spy to inspect generated SQL statements when debugging a Spring Boot application. Because let's face it, squinting at TRACE logs is about as fun as a root canal.

Wanna have fun with Spring Boot? Check those tips and tricks out!
For more dedicated coding tips and tricks in general, see this article.

Today we're going on a container diet journey that'll make your Spring Boot apps leaner than the bloated things you often see during your Docker builds.
This is a comprehensive guide on how to integrate KeyCloak into your Spring Boot application.