1.創建client-server

next->

選兩個:
選client

選web

yml:
server: port: 8891 spring: application: name: eureka-client eureka: client: serviceUrl: defaultZone: http://user:123456@localhost:8890/eureka/ instance: prefer-ip-address: true management: endpoints: web: exposure: include: '*'

加注解:@EnableDiscoveryClient 也可用 @EnableEurekaClient

測試一下:

