Skip to content

How to Create a REST API with Spring Boot (step-by-step tutorial)

Notifications You must be signed in to change notification settings

theagoliveira/algaworks-algacrm-api

Repository files navigation

How to Create a REST API with Spring Boot (step-by-step tutorial)

Tutorial by AlgaWorks.

Table of Contents

Description

From the YouTube description:

"In this video you will learn how to implement a REST API using some Spring ecosystem projects, such as Spring Boot and Spring Data JPA."

Project Summary

  • Project: Maven
  • Java: 16
  • Spring Boot: 2.4.5
  • Dependencies
    • Spring Web
    • Spring Boot DevTools
    • Spring Boot Starter Test
    • H2 Database
    • Spring Data JPA
    • Lombok
    • Spring Security
    • Bucket4j Spring Boot Starter
    • Spring Cache Abstraction
    • Ehcache
    • Logback
  • Plugins
    • Spring Boot Maven Plugin
    • Heroku Maven Plugin

API Documentation

Get Clients

Retrieves a list of all clients.

Request

GET /clientes

Sample Response (200 OK)

[
    {
        "id": "uuid-1",
        "nome": "client-1"
    },
    {
        "id": "uuid-2",
        "nome": "client-2"
    }
]

Add Client

Add a new client to the application.

Request

POST /clientes

Sample Request Body

{
    "nome": "new-client"
}

Sample Response (201 Created)

{
    "id": "new-uuid",
    "nome": "new-client"
}

Deployment

API deployed on Heroku

About

How to Create a REST API with Spring Boot (step-by-step tutorial)

Topics

Resources

Stars

Watchers

Forks

Languages