Create a REST API in Spring Boot with MySQL

Andrea Perera
5 min readSep 8, 2020

Introduction

This article will look into how to create a RESTful API using HTTP methods for CRUD(Create, Retrieve, Update and Delete) operations in Spring Boot along with the MYSQL database. Spring Boot is an open-source Java-based framework to build enterprise spring applications.

Requirements

1. Maven 3.0+

2. IDE(Eclipse or IntelliJ)

3. JDK 1.8+

4. MYSQL database server

5. Postman for testing

Overview

  1. Create the Spring Boot Project from Spring Initializr
  2. Create MYSQL database and define Database configurations
  3. Create Entity model class
  4. Create JPA Data Repository
  5. Create Service class
  6. Create Rest Controllers class
  7. Build and Run the Project
  8. Testing using Postman

1.Create the Spring Boot Project from Spring Initializr

Artifact: The name of the folder

--

--

Andrea Perera
Andrea Perera

Written by Andrea Perera

Technical Writer | Software Engineer | MSc in Big Data Analytics | Email:andriperera.98@gmail.com | Linkedin: Andrea Perera