September 2018
Intermediate to advanced
412 pages
11h 12m
English
The following example illustrates how to use Eureka to register your service and look up the service using the Eureka client:
import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;@SpringBootApplication@EnableEurekaServerpublic class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); }}application.yml file given below which looks up the eurekaserver: port: ${PORT:8761}eureka: client: registerWithEureka: false fetchRegistry: false server:waitTimeInMsWhenSyncEmpty: 0