Skip to content

Spring Reactive - Consuming Rest API with Spring WebClient

Notifications You must be signed in to change notification settings

carlossfb/viacep_webclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

Create a docker image from Dockerfile
    docker build -t reactive-viacep:1.0.0 .

Run application

    docker run --name reactive-viacep_container -p 8080:8080 -d reactive-viacep:1.0.0

/api/{cep}

    {
      "cep": "03252-000",
      "logradouro": "Rua Barbeiro de Sevilha",
      "complemento": "",
      "bairro": "Vila Rosa Molla",
      "localidade": "São Paulo",
      "uf": "SP",
      "ibge": "3550308",
      "gia": "1004",
      "ddd": "11",
      "siafi": "7107",
      "_links": {
        "self": {
          "href": "http://localhost:8080/api/03252000"
        }
      }
    }

Create a build (and change name of JAR) for use in Docker container

   mvn clean package

(Example POM)

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
		<finalName>application</finalName> *Name of JAR file*
	</build>

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely:

About

Spring Reactive - Consuming Rest API with Spring WebClient

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published