This article will show you how to document and interact with your Spring Boot REST Services using Swagger UI. For the purpose of this example, we will be using springdoc-openapi library.
REST Services
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.
Managing XML with Spring Boot Controllers
This article will discuss how to consume and produce XML files using Spring Boot REST Controllers. We will also show in simple steps how to serialize Java objects that we will use as body of our Request and Response.
REST Controller Not found in Spring Boot: How to solve it
A pretty common issue for Spring Boot application is a 404 Not Found Error for your REST Controllers. Let’s learn how to fix it in one minute!
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.
How to manage JSON in Spring Boot with Jackson
In this tutorial we will learn how to produce and consume JSON data in a Spring Boot applications using the built-in Jackson provider.
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.
Spring Boot REST Controller example
In this tutorial we will learn how to create an example Spring Boot REST application which includes a Controller, a Repository and a main Application class.
Manage upload/download of files using REST and Spring Boot
In this tutorial we will learn how to manage the upload and download of files using Spring Boot REST Services. We will use for this purpose Swagger UI to interact with a REST Controller.