Eureka Naming Server
Eureka Naming Server is a REST-based service registry commonly used in microservices architectures for service discovery, load balancing, and fault tolerance.
It enables microservices to locate and communicate with each other without the need to hardcode IP addresses or ports. Eureka server is widely used for service discovery in Spring Cloud applications.
Register all required microservices to Eureka naming server and use Eureka naming server domain and port to access registered microservice.
Follow below steps to create a Eureka name server:
- Create a spring boot project, add Eureka Server as dependency and download it as a zip post clicking on GENERATE button.

2. Add below dependency inside pom.xml

3. Annotate spring boot main class as @EnableEurekaServer
4. Add below properties as part of application.properties:
server.port=8761
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
5. Hitting http://localhost:8761/ URL will load below view:

Create Order Project
Follow below step to create Order Service Spring project and register same in Eureka Naming Server.
- Create a microservice project, add Eureka Discover Client to get register in Eureka Naming Server and Spring Web for rest APIs as a dependency.

2. Add below properties and add Eureka client service URL:
spring.application.name=order-service
eureka.client.service-url.defaultZone=http://localhost:8761/eureka/
3. Replace below spring.cloud.version from demo project to order project.

4. Copy below dependency management from Eureka Server cofig pom.xml to Order Service:

Create Product Project
Follow below step to create Product Service Spring project and register same in Eureka Naming Server.
- Create a microservice project, add Eureka Discover Client to get register in Eureka Naming Server and Spring Web for rest APIs as a dependency.

2. Add below properties and add Eureka client service URL:
spring.application.name=product-service
eureka.client.service-url.defaultZone=http://localhost:8761/eureka/
server.port=8081
3. Replace below spring.cloud.version from demo project to product project.

4. Copy below dependency management from Eureka Server config pom.xml to Product Service:

OUTPUT:
Start both Product and Order service on 8080 and 8081 port.

Conclusion:
In layman’s terms, Eureka Naming Server allows us to register all the services in one place to have a quick list view of all the services.
I hope you found out this article interesting and informative.

Imran Khan, Adobe Community Advisor, certified AEM developer and Java Geek, is an experienced AEM developer with over 12 years of expertise in designing and implementing robust web applications. He leverages Adobe Experience Manager, Analytics, and Target to create dynamic digital experiences. Imran possesses extensive expertise in J2EE, Sightly, Struts 2.0, Spring, Hibernate, JPA, React, HTML, jQuery, and JavaScript.