August 2018
Intermediate to advanced
372 pages
9h 29m
English
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@SpringBootApplicationpublic 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:
Read now
Unlock full access