Skip to content

saurabhshcs/bootify-crud-aws-rds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bebf215 · Mar 27, 2023

History

25 Commits
Nov 8, 2020
Nov 8, 2020
Nov 8, 2020
Mar 27, 2023
Mar 27, 2023
Mar 6, 2023
Nov 8, 2020
Nov 8, 2020
Nov 8, 2020
Nov 8, 2020

Repository files navigation

bootify-crud-aws-rds

Created a aws-rds database: Please following links for the reference link to learn or see how to create an instance of amazon RDS.

This project is just for an sample demonstration and to see how to connect with Amazon RDS Endpoint and intract while performing crid operations.

Required Tools & Applications

It is containing the database CRUD operaiton with AWS RDS Mysql databse. You need to configure MYSQL on AWS using AWS RDS and grab the connection string to configure in application.yaml

server:
    port: 9003

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://{AWS_RDS_ENDPOINT_URL}m:3306/bootify
    username: bootify
    password: Bootify123
  jpa:
    show-sql: true
    properties:
      dialect: org.hibernate.dialect.MySQL5Dialect
    hibernate:
      ddl-auto: create

Run all the test

./gradlew test

Run application

./gradlew bootRun

Payload of three (3) Request of Add Product

curl -d '{"name":"Microsoft", "qty":1100, "price": 212.99}' -H "Content-Type: application/json" -X POST http://localhost:9003/addProduct

curl -d '{"name":"Apple", "qty":500, "price": 2912.99}' -H "Content-Type: application/json" -X POST http://localhost:9003/addProduct

curl -d '{"name":"HP", "qty":50, "price": 912.99}' -H "Content-Type: application/json" -X POST http://localhost:9003/addProduct

Get All products

curl -X GET -H "Content-type: application/json" -H "Accept: application/json"  "http://localhost:9003/products"
[
    {
        "id": 1,
        "name": "Microsoft",
        "qty": 1100,
        "price": 212.99,
        "creationTS": null
    },
    {
        "id": 2,
        "name": "Apple",
        "qty": 500,
        "price": 2912.99,
        "creationTS": null
    },
    {
        "id": 3,
        "name": "HP",
        "qty": 50,
        "price": 912.99,
        "creationTS": null
    }
]

Read

Follow me on - Medium | Linkedin | YouTube | StackOverFlow

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages