If you are using an IDE, use it to run the project because you will get Live Reload working.
If you wanna use your terminal, just run:
./mvnw spring-boot:run
./mvnw test
./mvnw spring-boot:run
# In another terminal, run:
curl http://localhost:8080/actuator/health
# Output should be {"status":"UP"}
curl http://localhost:8080/api/v1/person \
-X POST \
-H "Content-Type: application/json" \
-d '{
"firstName": "Axell",
"lastName": "Brendow",
"cpf": "23108762087",
"birthDate": "15-09-2021",
"phones": [
{
"type": "MOBILE",
"number": "(11)999999999"
}
]
}' | json_pp
curl http://localhost:8080/api/v1/person | json_pp
curl http://localhost:8080/api/v1/person/1 | json_pp
curl http://localhost:8080/api/v1/person/1 -X DELETE
curl http://localhost:8080/api/v1/person/1 \
-X PUT \
-H "Content-Type: application/json" \
-d '{
"firstName": "Axell_updated",
"lastName": "Brendow_updated",
"cpf": "23108762087",
"birthDate": "15-09-2021",
"phones": [
{
"type": "MOBILE",
"number": "(11)999999999"
}
]
}' | json_pp