Skip to content

API for create and find countries using Spring Reactive Web.

Notifications You must be signed in to change notification settings

diogoalbuquerque/reactive-country-api

Repository files navigation

Spring Reactive Application

Build Application codecov

Country API

API for create and find countries.

Goal

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.

Composition

The project is composed of the domain module and the application module.

Build

To build the project, Java 17 is required.

Then run the command below.

gradle clean build

Run

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

Endpoints

Find country

    GET /v1/country/1 HTTP/1.1
    Host: localhost:8080

Find all countries

    GET /v1/country HTTP/1.1
    Host: localhost:8080

Create country

    POST /v1/country HTTP/1.1
    Content-Type: application/json
    Host: localhost:8080
    Content-Length: 44
    
    {
        "name": "Brazil",
        "abbreviation": "BR"
    }

About

API for create and find countries using Spring Reactive Web.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published