Lombok @Log4j, @Slf4j and Other Log Annotations

1. Overview In this tutorial, we're going to examine Lombok log annotations like @Slf4j, @Log4j or @Log. 2. Use Log Annotations Lombok provides sev...

Continue Reading

Lombok @SneakyThrows

1. Overview In this tutorial, we'll look at the Lombok @SneakyThrows annotation. 2. Maven Dependency We'll first add the Lombok maven dependency: <...

Continue Reading

Thymeleaf Multiple Template Locations using Spring Boot

1. Overview In this tutorial, we'll see how we can define multiple template locations using Thymeleaf in a Spring Boot application. 2. Maven Depend...

Continue Reading

Using @RequestBody and @ResponseBody with Spring MVC

1. Overview In this tutorial, we'll look at the @RequestBody and @ResponseBody annotations in Spring MVC. 2. Sample Application Throughout the tuto...

Continue Reading

Quick Guide to ResponseBodyAdvice in Spring MVC

1. Overview In this tutorial, we'll investigate the ResponseBodyAdvice interface in Spring MVC. By using its implementations, we can modify the pay...

Continue Reading

Quick Guide to RequestBodyAdvice in Spring MVC

1. Overview In this tutorial, we'll investigate the RequestBodyAdvice interface in Spring MVC. By using its implementations, we can customize how S...

Continue Reading

Setting Response Status with Spring MVC

1. Overview In this tutorial, we'll explore different ways to set the response status using Spring MVC. 2. Default Status Codes By default, Spring ...

Continue Reading

Logging with Request Correlation using MDC

1. Overview In this tutorial, we'll look at how we can use MDC to include a correlation id to the logs in a web application. This way it will be ea...

Continue Reading

Using Model, ModelMap and ModelView in Spring MVC

1. Overview In this tutorial, we'll investigate the model-related classes that Spring MVC provides. Namely, we'll look at the Model, ModelMap, Map ...

Continue Reading

Log Incoming Requests using Spring MVC

1. Introduction In this tutorial, we'll investigate how we can log incoming requests using Spring MVC. 2. Sample Application Let's first look at ou...

Continue Reading