武汉网站建设报价明细表/关键词你们懂的
1、官方地址:https://github.com/Netflix/eureka/wiki/Eureka-REST-operations
2、自己搭建一个 Eureka服务运行起来。
3、打开Postman开始干活。
4、先获取下所有服务。
5、模拟注册
注册内容:
<instance>
<instanceId>MyApp01</instanceId>
<hostName>localhost</hostName>
<app>MyApp01</app>
<ipAddr>127.0.0.1</ipAddr>
<status>UP</status>
<port enabled="true">8080</port>
<dataCenterInfo class="com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo">
<name>MyOwn</name>
</dataCenterInfo>
</instance>
6、模拟发心跳
7、再获取服务看看
获得的信息如下:
<applications><versions__delta>1</versions__delta><apps__hashcode>UP_1_</apps__hashcode><application><name>MYAPP01</name><instance><instanceId>MyApp01</instanceId><hostName>localhost</hostName><app>MYAPP01</app><ipAddr>127.0.0.1</ipAddr><status>UP</status><overriddenstatus>UNKNOWN</overriddenstatus><port enabled="true">8080</port><securePort enabled="false">7002</securePort><countryId>1</countryId><dataCenterInfo class="com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo"><name>MyOwn</name></dataCenterInfo><leaseInfo><renewalIntervalInSecs>30</renewalIntervalInSecs><durationInSecs>90</durationInSecs><registrationTimestamp>1589960420840</registrationTimestamp><lastRenewalTimestamp>1589960420840</lastRenewalTimestamp><evictionTimestamp>0</evictionTimestamp><serviceUpTimestamp>1589960420840</serviceUpTimestamp></leaseInfo><metadata class="java.util.Collections$EmptyMap"/><isCoordinatingDiscoveryServer>false</isCoordinatingDiscoveryServer><lastUpdatedTimestamp>1589960420840</lastUpdatedTimestamp><lastDirtyTimestamp>1589960420839</lastDirtyTimestamp><actionType>ADDED</actionType></instance></application>
</applications>
8、查看界面
9、模拟删除服务
删除后,获取所有服务查看。
查看界面