Follow :
Creating a Eureka Service
1. Creating a Eureka Service
To begin with, create a EurekaServer Spring Starter Project in Eclipse/STS
IDE.
Click on Spring Starter Project and click on Next.
2. Name your Spring Starter Project as EurekaServer and other Information
will be filled automatically.
Note: Make sure your Internet is connected otherwise it will show an
error.
3. Now, modify EurekaServer/src/main/resources/application.properties
file to add a port number and disable registration.
spring.application.name=eureka-server
server.port=8761
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
4. Open EurekaServer/src/main/java/com/csrk/EurekaServerApplication.java and add
@EnableEurekaServer above @SpringBootApplication.
This annotation will configure a registry that will allow other applications
to communicate.
5. To start the Application: Right Click on the
Project - Run As - Click on " Spring Boot App "
Now open http://localhost:8761.
Here Spring Eureka Server will open and will show no service will be running.