Since Eureka was created to allow a smooth integration with Spring Boot, a service registry can be implemented simply by adding the following dependency:
compile
('org.springframework.cloud:spring-cloud-starter-netflix-eureka-server')
The application class should be modified as well to indicate that the application will work as a Eureka server, as follows:
@EnableEurekaServer
@SpringBootApplication
public class ServiceRegistryApplication
{
public static void main(String[] args)
{
SpringApplication.run(ServiceRegistryApplication.class, args);
}
}
After running the application, you can see the web console at http://localhost:8901/, as shown in the following screenshot:
Eureka web console