this is an example of a java Application with mysql Db
in docker and separate container with docker-compose
default JDK 1.8
- go to the root directory of project
- run command
mvn clean package
- then run command
docker build -t api-docker-image .
- after that run command
docker-compose up
- in the end open Postman Application or any Other tools send a post request
with request body like:
{"name":"Apple","color":"Yellow"}
to this urlhttp://localhost:9091/fruits
for call application save method