Building your first REST API: Java and Spring Boot
A beginner-friendly guide to building your first RESTful web service using Spring Boot and Java. From project creation to posting your first REST request.
Introduction
As web development has progressed over the years it is becoming more and more necessary to understand how to connect your websites and apps to a backend service, even if it is just to connect to a database.
Currently one of the easiest ways to get your frontend and backend connected is by using a REST API. Luckily because they have become so popular there are plenty of different ways to easily create them using many different languages such as JavaScript, Python and Java just to name a few. If you are unfamiliar with REST API’s and are wondering what I am even talking about you can read my previous article that goes over the basics.
In this guide, I will be walking through creating a REST API using one of my favourite frameworks Spring. I say it is my favourite mostly because I used it as part of my thesis in the final year of my software degree, but it is also a very powerful and useful framework for creating RESTful web services as you will see below.
Before we begin
Before I get into the nitty-gritty of creating our REST service I will explain…