Springboot CRUD api using containerized mongoDB. Feel free to use it as an example for your projects.
Make sure ports 27017 & 8080 are available.
javongo/
mkdir -p mongodb/db
docker-compose up -djavongo/javongo/
./gradlew bootRunServer should be running on localhost:8080.
GET /javongos GET /javongo/${id}| Parameter | Type | Description |
|---|---|---|
id |
string |
Required. Id of javongo to fetch |
POST /javongoRequest body
{
"message": "<your-javongo-message>"
}| Parameter | Type | Description |
|---|---|---|
message |
string |
Required. Message of new javongo |
PUT /javongo/${id}Request body
{
"message": "<your-javongo-message>"
}| Parameter | Type | Description |
|---|---|---|
id |
string |
Required. Id of javongo to update |
message |
string |
Required. Message of updated javongo |
DELETE /javongo/${id}| Parameter | Type | Description |
|---|---|---|
id |
string |
Required. Id of javongo to remove |
javongo/
docker-compose down -vYou can kill the springboot process, pressing Ctrl + c in the terminal where the procces is running.
Made with π and </>.