Skip to content

rajayan1986/TodoAppSpringboot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Run RestfulWebServicesApplication as a Java Application.

Containerization

Troubleshooting

Creating Containers

  • mvn package
  • docker run in28min/todo-rest-api-h2:0.0.1-SNAPSHOT
  • docker run -p 5000:5000 in28min/todo-rest-api-h2:0.0.1-SNAPSHOT
  • docker run -p 5000:5000 in28min/todo-rest-api-h2:1.0.0.RELEASE

To test execute API at http://localhost:5000/users/in28minutes/todos.

docker login

Hello World URLS

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

Todo JPA Resource URLs

[
  {
    "id": 10001,
    "username": "addd",
    "description": "Learn JPA",
    "targetDate": "2019-06-27T06:30:30.696+0000",
    "done": false
  },
  {
    "id": 10002,
    "username": "add2",
    "description": "Learn Data JPA",
    "targetDate": "2019-06-27T06:30:30.700+0000",
    "done": false
  },
  {
    "id": 10003,
    "username": "adde3",
    "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 a new todo

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

Delete todo

H2 Console

Azure Resource Commands

az group create --name container-resource-group --location westeurope
az appservice plan create --name container-service-plan --resource-group container-resource-group --sku P1v2 --is-linux
az webapp create --resource-group container-resource-group --plan container-service-plan --name todo-rest-api-h2-container --deployment-container-image-name in28min/todo-rest-api-h2:1.0.0.RELEASE

Continuous Deployment

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages