The acronym REST stands for REpresentational State Transfer, while API stands for program Programming Interface.

Together, they refer to a REST API.

you’re able to learn how to create a REST API using Spring Boot.

Spring RSET API

Youll need to alter the dependencies, though.

For this REST API, you will need a controller, a model, and a repository.

Youll also notice several annotations that serve different purposes.

REST API file structure

Creating the Repository

This repository will allow you to interact with the customer data in the database.

The controller also uses several important Spring annotations that allow it to perform its functions.

Your next step is to create the database and customer table in MySQL.

REST API post header

POST Request

This request will allow you to create new customers using the REST API.

You should set this headers value to program/json, as youll be creating new customers using JSON.

DELETE Request

you’re free to also delete Janet from the database.

REST API post body

Software testing is important to Spring Boot.

Each initialized Spring system uses JUnit for testing and allows you to send requests to your REST APIs.

REST API post response

REST API get response

REST API get by ID response

REST API put response

REST API delete response