Skip to content

Weather-Forecast - Spring Boot Web Reactive with Cloud-Starter-Zipkin

Notifications You must be signed in to change notification settings

afavre/weather-forecast

Repository files navigation

Weather-Forecast - Spring Boot Web Reactive with Cloud-Starter-Zipkin and Java 12

Simple weather forecast SpringBoot app using openweathermap API

  • Zipkin server
  • SpringBoot service using Java 12 for Weather Forecast using a random forecast generator if Open Weather API is not configured correctly
  • Docker-Compose Orchestration

Prerequisite

  1. Docker-compose
  2. Create a free account at https://home.openweathermap.org (otherwise a failover will generate random values)

1 - Update your open-weather appId

Either

  • resources/application.properties
  • docker-compose.yml
  • environment variable ${OPENWEATHER_APPID}

2 - Start to service

cd weather-forecast
docker-compose up -d

3 - Send some requests

The API is simplistic: http://localhost:8080/{country_code}/{city}

curl -X GET http://localhost:8080/uk/london

4 - Analyse the data in Zipkin

Open your favorite browser and go to http://localhost:9411/zipkin to see the data generated by your request.

To come:

  • Extraction of the Failover service in a separate micro-service
  • Kubernetes Orchestration

About

Weather-Forecast - Spring Boot Web Reactive with Cloud-Starter-Zipkin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages