Awesome Open Source
Awesome Open Source


Build Status

Example project combining Spring Boot apps together with Spring Cloud Netflix & Docker

It was created as a showcase for this blog post: Scaling Spring Boot Apps on Docker Windows Containers with Ansible: A Complete Guide incl Spring Cloud Netflix and Docker Compose and is used by this Ansible repository: ansible-windows-docker-springboot

It´s roughly structured like shown in this sketch:



As the whole example-application is Dockerized, just do a docker-compose up -d and all apps will be started for you. Run a docker ps to see what´s going on. Then enter http://localhost:8761/ to see all Services registering in Eureka.

The zuul-edgeservice proxies weatherservice (by retrieving routes dynamically from eureka-serviceregistry) that itself calls weatherbackend

Example: http://localhost:8080/api/weatherservice/soap

There´s a Client application inside this project too, so you can fire requests to the weather-service with that one to - and it should be clear, how to implement a consumer :) For that, just fire up the weatherclient - it should be right there after a mvn clean package ran inside the root directoy.

Spring Cloud 2.x Upgrade

Renamed starters:

Errors bean overriding


The bean 'weatherServiceClient', defined in de.jonashackt.WeatherclientTestApplication, could not be registered. A bean with that name has already been defined in class path resource [de/jonashackt/configuration/WeatherclientConfiguration.class] and overriding is disabled.

See, bean overriding (DI) isn't the default behavior anymore and you have to use:

spring.main.allow-bean-definition-overriding: true

inside src/test/resources/application.yml.


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
java (31,749
docker (2,972
spring-boot (784
eureka (53
zuul (43
feign (28