Run RestfulWebServicesApplication as a Java Application.
- Problem - Caused by: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: java.io.IOException: No such file or directory
- Solution - Check if docker is up and running!
- Problem - Error creating the Docker image on MacOS - java.io.IOException: Cannot run program “docker-credential-osxkeychain”: error=2, No such file or directory
- Solution - https://medium.com/@dakshika/error-creating-the-docker-image-on-macos-wso2-enterprise-integrator-tooling-dfb5b537b44e
- 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{"message":"Hello World - Changed"}{"message":"Hello World, in28minutes"}[
{
"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
}
]
{
"id": 10001,
"username": "in28minutes",
"description": "Learn JPA",
"targetDate": "2019-06-27T06:30:30.696+0000",
"done": false
}
- POST to http://localhost:5000/jpa/users/api/todos with BODY of Request given below
{
"username": "in28minutes",
"description": "Learn to Drive a Car",
"targetDate": "2030-11-09T10:49:23.566+0000",
"done": false
}
- http://localhost:5000/jpa/users/api/todos/10001 with BODY of Request given below
{
"id": 10001,
"username": "dssd",
"description": "Learn to Drive a Car",
"targetDate": "2045-11-09T10:49:23.566+0000",
"done": false
}
- http://localhost:5000/h2-console
- Use
jdbc:h2:mem:testdbas JDBC URL
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