Crud_Lover_JAVA

Build With

features developed

  • use Validation I/O at car model
  • GET all the cars
  • POST a car
  • DELETE a car by id
  • GET a car by id
  • UPDATE a car by id

about the project

a project based on another project on my github, which is: cars_api_java and ModelaAí, I chose to make it it separately for educational purposes. The goal of this part of the project was to create the services folder and use controllers to send http status and communicate with services and services to communicate with the repository. In this part of the project I used the Validation I/O to validate the Car model.

Getting Started

To clone the project, run the following command:

git clone https://github.com/NinaS23/Crud_Lover_JAVA.git

Then navigate to the project file in ApiApplication.java and:

run the project

  ☰   Request

the url used is

 http://localhost:8080/api/cars
Body POST
{
  "modelo": "Fiat Argo 1.3",
  "fabricante": "Fiat",
  "dataFabricacao": "2006-10-02",
  "valor": 10.000,
  "anoModelo": 2023
}
request GET

just need to use this url after a POST

 http://localhost:8080/api/cars
request GET by id

replace the id in this url with the id of the car you want to get

 http://localhost:8080/api/cars/{id}
request DELETE

replace the id in this url with the id of the car you want to delete

 http://localhost:8080/api/cars/{id}
request UPDATE

replace the id in this url with the id of the car you want to update

 http://localhost:8080/api/cars/{id}