API for create and find countries.
Create a POC application for an API using Spring Boot 3.0.0 with the following dependencies, Spring Reactive Web, Spring Data Reactive MongoDB and Spring Validation.
With these dependencies it was possible to create an API that create and find a country.
The project is composed of the domain module and the application module.
To build the project, Java 17 is required.
Then run the command below.
gradle clean build
After the build, the artifact will be available at: /application/build/libs/
Just run the application artifact
java -jar ./application/build/libs/application-0.0.1-SNAPSHOT.jar
GET /v1/country/1 HTTP/1.1
Host: localhost:8080
GET /v1/country HTTP/1.1
Host: localhost:8080
POST /v1/country HTTP/1.1
Content-Type: application/json
Host: localhost:8080
Content-Length: 44
{
"name": "Brazil",
"abbreviation": "BR"
}