Skip to content

serhat-ture/cellPhone-Rest-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Product -Rest-API

I built CRUD RESTFul APIs for a Simple Product Management System using Spring Boot, Spring Data JPA, and PostgreSQL database.

In this project are used Spring Boot + PostgreSQL + JPA/Hibernate.

Before development, make sure that the PostgreSQL database is installed on your machine, and then create a product database.

🚀 About Me - Author

Testing REST APIs via Postman Client

  1. Create Product REST API HTTP Method: POST

Request URL: http://localhost:8080/addProduct

  1. Add Products REST API HTTP Method: POST

Request URL: http://localhost:8080/addProducts

  1. Get Product by ID REST API HTTP Method: GET

Request URL: http://localhost:8080/productById/2

  1. Get all Products REST API HTTP Method: GET

Request URL: http://localhost:8080/products

  1. Update Product REST API HTTP Method: PUT

Request URL: http://localhost:8080/update

  1. Delete Product REST API HTTP Method: DELETE

Request URL: http://localhost:8080/deleteProduct/8

  1. Find Product By Name REST API HTTP Method: GET

Request URL: http://localhost:8080/product/Iphone13

Sample json

[
    {
        "id": 1,
        "name": "Iphone 13",
        "quantity": 18,
        "price": 19250.0
    },
    {
        "id": 3,
        "name": "Iphone 12",
        "quantity": 30,
        "price": 18000.0
    },
    {
        "id": 4,
        "name": "Oppo A91",
        "quantity": 42,
        "price": 9102.0
    },
    {
        "id": 5,
        "name": "Aselsan 1920",
        "quantity": 2,
        "price": 36500.0
    },
    {
        "id": 6,
        "name": "Sony",
        "quantity": 56,
        "price": 14330.0
    },
    {
        "id": 2,
        "name": "Nokia 5110",
        "quantity": 4,
        "price": 5000.0
    }
]

About

Spring Boot, PostgreSQL, JPA, Hibernate RESTful API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages