Documenting REST APIs With Open API And Spring Boot

REST API Documentation This tutorial will show you an example on how to document REST APIs using OpenAPI 3. When creating a REST API, good documentation is instrumental. Here I will use OpenAPI 3 in Spring application for creating documentation for REST APIs. I will create and deploy REST services but I do not have an option to let others…

REST over Https with Client certificate Authentication

Introduction The tutorial, REST over HTTPS with client certificate authentication, will show you how we can use client certificate to handshake with server along with basic authentication for consuming the service. Even you can use header authentication along with client certificate to make more secure. I will create Spring Boot application on Spring REST API and build the application using…

@WebMvcTest Annotation Example in Spring MVC Applications

Introduction We will see the use of @WebMvcTest annotation in Spring MVC applications. The Spring MVC application may be Spring Boot application as well. The @WebMvcTest annotation can be used not only to test Spring Controllers but also Spring REST Controllers. We will build the applications using both maven and gradle tools. @WebMvcTest annotation is used for unit testing of…

Implementing Caching in Spring REST Services

Introduction Here I am going to show an example on implementing caching in Spring REST web services. Caching is used to store copies of frequently accessed data in several places for the request-response path. In other words, it stores a copy of a given resource and serves it back when requested. The performance of web sites and applications can be…

Upload file using React and Spring Boot

Introduction In this tutorial you will see how to upload file using React and Spring Boot technologies. React or React JS will be used as a client side or front end technology and Spring Boot will be used as a server side technology for uploading file. I will upload file to server using Spring REST API. As a server side…

Download file using React and Spring Boot

Introduction In this post you will see how to download file using React JS and Spring Boot. There are situations where you need to download file from server or you need to generate report from database and download it. This example may help you in that situation. Here I will fetch records from database and download in a JSON format….

Download File Using Angular And Spring Boot REST

Download File – Spring Boot REST API In this post I will show you how to download file using Angular framework and Spring Boot. There are situations when you need to download file from server or you need to generate report from database and download it. This example may help you in such situation. I will build the Spring Boot…

Exception Handling in Spring Boot Application

Table of Contents Introduction Prerequisites Project Setup Entity Class Repository Interface Exception Classes Advice for Exception Spring REST Controller Spring Boot Main Class Testing Exception Handling Source Code Introduction This post will show you an example on exception handling in Spring web application. In other words, you can also say exception handling in Spring MVC. I will use handle exception…

HATEOAS driven REST API using Spring Boot

Introduction In this post you will see an example on HATEOAS driven REST API using Spring Boot. An approach that breaks down the principal elements of a REST approach into three steps are resources, http verbs and hypermedia controls: Without using any mechanism of the web, HTTP is used as a transport system for remote interactions. Every individual service end…

Angular + Spring Boot file upload example

Introduction Here we will see how to upload file using Angular and Spring Boot application. The Angular + Spring Boot file upload example will use the Angular example from and we will see here how to write server side code for Spring Boot application. We will also exclude the default server Tomcat and include the Jetty server for our Spring…