Practice Springboot App with in memory storage for a person api. This has the ability to create, get, and remove person(s).
From root directory of project, run ./gradle bootRun
Currently everything is running on port 8080, at /persons
From root directory of project, press Ctrl+C
From root directory of project, run ./gradlew clean build
to build the project
After building the project, run docker build . -t person-api:latest
to build the docker image
After building the docker image, run docker run --name person_api --publish 8080:8080 --detach person-api
Currently everything is running on port 8080, at /persons
From root directory of project, run docker stop person_api
to stop gracefully (docker kill person_api
to force)
Remove the container by running docker rm person_api
Remove the docker image by running docker rmi person_api
From root directory of project, run ./gradlew clean build
to build the project
After building the project, run docker-compose up -d
to build the docker image and run the container
Currently everything is running on port 8080, at /persons
From root directory of project, run docker-compose down --rmi all
GET /persons
RESPONSE BODY:
[
{
"id": UUID,
"name": {
"first": String,
"last": String
},
"birthday": {
"month": Integer,
"day": Integer,
"year": Integer
}
}
]
POST /persons
REQUEST BODY:
{
"name": {
"first": String,
"last": String
},
"birthday": {
"month": Integer,
"day": Interger,
"year": Integer
}
}
RESPONSE HEADERS: Location: `/persons/{id}
GET /persons/{id}
RESPONSE BODY:
{
"id": UUID,
"name": {
"first": String,
"last": String
},
"birthday": {
"month": Integer,
"day": Integer,
"year": Integer
}
}
PUT /persons/{id}
REQUEST BODY:
{
"name": {
"first": String,
"last": String
}
}
RESPONSE BODY:
{
"name": {
"first": String,
"last": String
},
"birthday": {
"month": Integer,
"day": Interger,
"year": Integer
}
}
DELETE /persons/{id}
RESPONSE BODY:
{
"name": {
"first": String,
"last": String
},
"birthday": {
"month": Integer,
"day": Interger,
"year": Integer
}
}