This is a quick tutorial for consuming services exposed by one Eureka client application in another Eureka client application. This tutorial has the prerequisite of a running Eureka server and a Eureka client application as well. In case if you do not have Eureka server or a Eureka client application, check out my previous posts in this series which explains how to setup eureka server and how to develop a eureka client application.
The eureka client which we will be developing in this tutorial will be registered in eureka server and will consume service exposed by another client application.
TL;DR You can download whole project by clicking following link.
To give you a brief idea about what we are developing… We will be creating a Eureka client in this tutorial. The client will be a spring boot application and will expose one rest endpoint. The client will also internally consume service exposed by another eureka client application.
This is a quick tutorial for creating a eureka client application. This tutorial has the prerequisite of a running eureka server. In case if you do not have running eureka server or a newbie, check out my previous post in this series which explains how to setup eureka server yourself. The eureka client which we will be developing in this tutorial will be registered in the eureka server.
TL;DR You can download whole project by clicking following link.
We will be creating a Eureka client in this tutorial. The client will be a spring boot application and will expose one rest endpoint. That endpoint will accept one value (or String, as said in Java world) as path parameter and will prefix it with ‘Hello’. The endpoint will return its result as String again.
This post contains pom.xml file and sample eureka server project built using Spring cloud version 1.5.18.RELEASE/ Edgware.SR5. Please refer Setting Up Eureka Server Using Spring Cloud post for detailed instructions.
For this tutorial, we will be creating a New Maven Project. To keep thing more simple we will be creating a simple maven project i.e. we will be skipping archetype selection.
New Maven Project Wizard – Creating a simple project