Skip to content

daylanbueno/book-comet-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

book-comet-api

You are hired as a software engineer to develop a new project: an e-commerce called "bookcomet.com", for a book publisher. To integrate with other systems you decide to write an API for that. You received only the following information from the business team:

Business rules:

  • The system cannot remove a book with positive inventory;
  • The system cannot have a negative inventory;
  • The system cannot have duplicate books (same name and author).

Tecnologies

  • Java
  • JDK 17
  • Spring Boot
  • Spring Data JPA
  • Lombok
  • Junit
  • H2 Database
  • Modelmapper
  • Docker
  • JJWT

Intalation.

mvn install

Create docker image

  • The command must be run in the folder where the dockerfile is
  • docker build -t book-comet-api:1.0 .

Create container

  • To test the application you can create a container after creating the image
  • By default it will start from an in-memory database.

Command to create the container.

docker run -p 8181:8181 --name book-comet-api book-comet-api:1.0

Testing API

After the application is running. Inside the project, there is a postman folder to facilitate testing. You just need to import in postman and you will be able to do the tests.

image

Visit my repositories to see more projects like this.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published