Spring Rest Client API made simple

Spring Boot 3.2 and Spring Framework 6.1 introduce a new feature called RestClient, which is a fresh synchronous way to communicate over HTTP. It’s similar to WebClient in its smooth way of handling requests but is built on the foundations of RestTemplate. In this article we will learn how to get started with Spring Boot … Read more

Use ControllerAdvice to handle Spring Boot Exceptions

In Spring Boot applications, graceful error handling is crucial for providing a seamless user experience and informative feedback. The @ControllerAdvice annotation offers a powerful mechanism to centrally handle exceptions thrown by your controllers. This approach promotes code reusability, consistency, and better error management.

Read more

Spring Boot Async Rest Controller: An example

In this tutorial, we’ll create an asynchronous REST controller in a Spring Boot application. By executing long-running tasks in background threads, the main thread can continue to handle other requests without being blocked. This can lead to a more responsive and scalable application.

Read more

How to return JSON objects as Response in Spring Boot

In this article, we’ll show you how to return a JSON object as a response in a Spring Boot application. We’ll start by creating a new Spring Boot project using the Spring Initializer, a web-based tool that generates a skeleton Spring Boot project with the necessary dependencies and configurations.

Read more