Method: Post localhost:8080/api/v1/person
{
"name": "Nelson Mandela"
}
Method: get localhost:8080/api/person
result
[
{
"id": "da8d2adc-1a61-4910-8d12-1d5d1a44fff7",
"name": "John Hammond"
},
{
"id": "223bc3d2-687b-4ffe-a2b6-148669901104",
"name": "Nelso Mandela"
},
{
"id": "69b821d0-8777-4214-8f8e-a5f4dfc17755",
"name": "Anna Brenda "
}
]
docker run --name postgresdb -e POSTGRES_PASSWORD=password -d -p 5432:5432 postgres:alpine
docker port dockerimageid/name
docker ps
docker exec -it dockerimageid bin/bash
psql
psql -U password
#list all databases
\l
# Enter into a db
\c databases
# Show all relationships
\d
# Describe a database/Relationships
\dt
# Enter into a table
\d person
#
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Spring Web
- Spring Web Services
The following guides illustrate how to use some features concretely: