Skip to content

muhammetenesakcayir/CRUD-Spring---Docker---Flyway

Repository files navigation

Case


This project providers fundamental product operations.


Table of Contents

Run

Running the application in dev mode

You can run Postgres in your local using our docker-compose.yml file in the root folder. See env/local-database.env file for an additional config.

docker-compose up

Then, you can run command as following;

./gradlew bootRun

Database Tables

db

Endpoints

Product

  • Create
    url: ../product | POST 
    
    • request
     {
      "title": "Tablet",
      "price": "300.00",
      "memberId": "1"
     }
    
    • response
    {
     "productId": 2
    }
    
  • Update
    url: ../product | PUT 
    
    • request
    {
     "title": "Tablet",
     "price": "550.00",
     "memberId": "1"
    }
    
    • response
    200 (Http Ok)
    
  • Delete
    url: ../product | DELETE 
    
    • request
    {
      "productId": "1"
    }
    
    • response
    200 (Http Ok)
    
  • List
    url: ../products | GET
    
    • response
    {
     "products": [
         {
             "id": 1,
             "title": "Tablet",
             "price": 300.00,
             "member": {
                 "id": 1,
                 "nickname": "John"
             }
         },
         {
             "id": 2,
             "title": "Phone",
             "price": 500.00,
             "member": {
                 "id": 1,
                 "nickname": "John"
             }
         }
     ]
    

}

Postman

You can use this postman collection to simulate http requests and responses

enoca.postman_collection.zip

Flyway

Flyway is a database migration tool also easy to use build database schema

Flyway with Spring

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published