Here is a quick teaser of how to setup Docker and run the code:
# Docker basics to build image from existing java image
# Pull a java docker image
docker pull openjdk
# Navigate to project directory and execute below command
docker build -t skeleton-web-services .
# run the built image with name
docker run --name skeleton-web-services skeleton-web-services
# To push the code to server. You need to have hub.docker.com account and a project name. Ommit this step if you are using existing image
docker tag skeleton-web-services dineshshabde/skeleton-web-services
docker login --username=username --email=email@domain.com
# After every changes push the image to server
docker push dineshshabde/skeleton-web-services
#To run the code
----------------
# Docker get latest update
docker pull dineshshabde/skeleton-web-services
# Run the code. Bind the port of docker to host
docker run -p 8080:8080 dineshshabde/skeleton-web-services
Get data curl -X GET -H "Cache-Control: no-cache" -H "Postman-Token: c2a293e9-19f0-ebd7-9414-1a57c90e674a" "http://localhost:8080/api/greetings/2" Update specific data curl -X PUT -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: 90745b40-0f27-dc2d-710c-2eb89a2d239a" -d '{"id": 2 ,"text":"BMW"}' "http://localhost:8080/api/greetings/2" Add data curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: c2bd1e8e-b3f6-195e-3c5f-5c6c5ebaba76" -d '{"text":"Amazon"}' "http://localhost:8080/api/greetings/" Get all data curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://localhost:8080/api/greetings Delete a specific data curl -X DELETE -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: 0ba75d1d-7bb0-a53f-2987-be62e8d33252" -d '{"id":2}' "http://localhost:8080/api/greetings/2" Asynchronus curl -X POST -H "Cache-Control: no-cache" -H "Postman-Token: ae48d829-48bd-c3ac-08a9-ab44575c8f94" "http://localhost:8080/api/greetings/2/send?wait=true"