Setting up Eureka naming Server and integrating with Config Server

Setting up Eureka naming Server and integrating with Config Server

In the last article, we have seen how to set up a config server using a spring cloud environment.
Now we will be going to see how to set up the Eureka naming server. I have explained What is a Eureka server in my previous article, The link is Here 
Eureka Server is again Spring Boot Application We need to create a Spring Boot application by selecting the following startup project.
Select the following dependency as mentioned in the Screenshot and apart from you need to add the following starter project in your pom.xml

Generate the project and import the project in your favorite IDE. as mentioned in the screenshot. Remove the application. properties. After successful import, my project looks like this

I have done following changes in the project. I have renamed main file to “” (no need to change). in the file I have added following entries.

Then, file i have added @EnableEurekaServer as below

public class Application {

   public static void main(String[] args) {, args);


Once started the Eureka Server, We can access the Eureka Server Dashboard by using the following endpoint
and you will be getting the following screens as in the screenshot.

When you look at the dashboard it shows that the eureka server itself registered as Eureka client but we don’t want this configuration. add the following attribute in properties files to ignore this config.


Now we have successfully set up the Eureka Server. but We have not configured the properties in Config Server. Then, we have to register the config Server in Eureka Service. These two tasks is pending now. First, we will see how to read the Eureka configuration from Config Service. 
Make sure that your config service application.yml file is having the following section of configuration.

        uri: file:///d:\test

Go to your Eureka Server and create a new file called bootstrap. properties file. In this file, you have to mention. the Eureka server application name and config Service access endpoint like below.

The meaning of this configuration is, your service registry application name is service-registry, and pointing out config service endpoint, using this endpoint eureka server loads all configuration details from GIT Hub Repository. In the git-hub repository, you have to create a service-registry.yml file that matches your application name in the file.

In the Service Registry application, you have to add the following artifact. This starter bootstrap is mandatory to load config data from the config Server.


While creating the Eureka service from we have already added the following dependency apart from this dependency you need to add the above dependency(spring-cloud-starter-bootstrap)


In the Eureka Service Application, we don’t need the application properties file. remove that properties file from the project and test folder we must keep the service.registry.yml file with the following configuration.

  port: 8761
    name: service-registry
  app: This is billing App Service Discovery default service
    register-with-eureka: false
    fetch-registry: false

Make sure this file committed to your local git repository. First, start the Config Service and start the Eureka Naming Service(we name it as registry-service) 
After a successful start of the Sever, you see the Eureka naming server dashboard like a blow.

Now we will going to start how to register Config Service in our Eureka naming Server. In order to do that you have to add the following starter project in the Service-registry application. that’s it you have done now. Whenever you start config service, The eureka server register this service in the eureka registry.


Let’s restart the config Service and test it. Once you start the config service you can see the following additional output in your Server console which says that the eureka server registers the config service in the Eureka service.

If you refresh the following eureka server endpoint you will be seeing config service registration details like below

We have successfully set up the Config Service and Eureka Service. In the next post, we will be going to setup the following service which s an account-service, product-service and reporting-service where we implement our business functionality and this server registered Eureka server and load the properties from config Service

Healthy Women makes healthy India. Buy Organic Sanitary napkin made up of using pure cotton and bamboo fiber.
Pure cotton XL Size

Pure Cotton XXL Size

Pure Bamboo XL Size

Pure Bamboo XXL Size


Close Menu