Method of building Eureka application with spring cloud
Introduction to Eureka
Eureka provides rest based services, which are mainly used for service management in the cluster. Eureka provides a client component based on Java language, which realizes the function of load balancing and creates conditions for the cluster deployment of business components. Using this framework, business components can be registered in Eureka container. These business components can be deployed in clusters. Eureka mainly maintains the list of these services and automatically checks their status.
Program structure
Create Eureka server
Maven dependency
Change the spring boot port in application yml
Open Eureka service annotation @ enableeurekaserver
Start springboot
During startup, there will be an exception that Eureka cannot connect to the server. This is because Eureka will use itself as a client to grab the registration information from the server
Source address: https://github.com/xc564864894/springcloud/tree/master/Eureka (%E4%B8%80)