karthiksonti24 / elasticbeanstalk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Todo and Hello World Rest APIs Connecting to H2 In memory database running on port 5000

Run com.in28minutes.rest.webservices.restfulwebservices.RestfulWebServicesApplication as a Java Application.

Hello World Resource

Hello World
{"message":"Hello World - Changed"}
{"message":"Hello World, in28minutes"}

Todo Resource

[
  {
    "id": 10001,
    "username": "in28minutes",
    "description": "Learn JPA",
    "targetDate": "2019-06-27T06:30:30.696+0000",
    "done": false
  },
  {
    "id": 10002,
    "username": "in28minutes",
    "description": "Learn Data JPA",
    "targetDate": "2019-06-27T06:30:30.700+0000",
    "done": false
  },
  {
    "id": 10003,
    "username": "in28minutes",
    "description": "Learn Microservices",
    "targetDate": "2019-06-27T06:30:30.701+0000",
    "done": false
  }
]

Retrieve a specific todo

{
  "id": 10001,
  "username": "in28minutes",
  "description": "Learn JPA",
  "targetDate": "2019-06-27T06:30:30.696+0000",
  "done": false
}

Creating a new todo

{
  "username": "in28minutes",
  "description": "Learn to Drive a Car",
  "targetDate": "2030-11-09T10:49:23.566+0000",
  "done": false
}

Updating an existing todo

{
  "id": 10001,
  "username": "in28minutes",
  "description": "Learn to Drive a Car",
  "targetDate": "2045-11-09T10:49:23.566+0000",
  "done": false
}

Delete todo

H2 Console

Build Spec for AWS Code Pipeline

version: 0.2
            
phases:
  install:
    runtime-versions:
      java: openjdk8
    commands:
      - echo install
  pre_build:
    commands:
      - echo pre_build
  build:
    commands:
      - mvn package
      - echo build
  post_build:
    commands:
      - echo post_build

artifacts:
  files:
    - target/spring-boot-todo-rest-api-h2-aws-codepipeline-0.0.1-SNAPSHOT.jar

About


Languages

Language:Java 100.0%