Spring-First-API

My first Java API written in Spring.

Folders

entity

Contains the Book class with the id as the primary key and a Message class for successful deletions.

rest

Contains the controller allowing interaction with CRUD actions of the database.

exception

There are two exceptions - one for HttpStatus.BAD_REQUEST and the other for NOT_FOUND.

repository

Contains the BookRepository which extends the JpaRepository.


Tech Stack

  • Spring
  • Java
  • MySQL (to create the database)
  • Postman (check the responses)