Skip to content

theagoliveira/amigoscode-spring-demo

Repository files navigation

Spring Boot Tutorial

Tutorial by Amigoscode.

Table of Contents

Description

From the YouTube description:

"This Spring Boot Tutorial will teach how to get started with Spring Boot and Java."

Project Summary

  • Project: Maven
  • Java: 16
  • Spring Boot: 2.4.4
  • Dependencies
    • Spring Data JPA
    • Spring Web
    • PostgreSQL
    • Spring Boot Starter Test
    • Spring Security
    • Bucket4j Spring Boot Starter
    • Spring Cache Abstraction
    • Ehcache
  • Plugins
    • Spring Boot Maven Plugin
    • Heroku Maven Plugin

API Documentation

Get Students

Retrieves a list of all students.

Request

GET /api/v1/student

Sample Response (200 OK)

[
    {
        "id": "uuid1",
        "name": "Thiago",
        "email": "thiago@example.com",
        "dob": "1872-01-01",
        "age": 149
    },
    {
        "id": "uuid2",
        "name": "Alex",
        "email": "alex@example.com",
        "dob": "1754-01-01",
        "age": 267
    }
]

Add Student

Add a new student to the application.

Request

POST /api/v1/student

Sample Request Body

{
    "name": "new-client",
    "email": "newclient@example.com",
    "dob": "2021-01-01"
}

Remove Student

Remove student from the application.

Request

DELETE /api/v1/student/:id

Update Student

Update student information (name and/or email).

Request

PUT /api/v1/student/:id

Request Parameters

Param Description
name New name
email New email

Errors

  • A student can't be created or updated if the new email already exists in the database.
  • A student can't be removed or updated if the id does not exist in the database.

Deployment

API deployed on Heroku

About

Spring Boot Tutorial

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages