当前位置:网站首页>Service Discovery @EnableDiscoveryClient
Service Discovery @EnableDiscoveryClient
2022-08-10 00:56:00 【A wind light cloud light】
@[email protected]@EnableDiscoveryClient //Service discoverypublic class PaymentMain8001{public static void main(String[] args){SpringApplication.run(PaymentMain8001.class,args);}}
@Resourceprivate DiscoveryClient discoveryClient;@GetMapping(value = "/payment/discovery")public Object discovery(){List services = discoveryClient.getServices();for (String element : services) {System.out.println(element);}List instances = discoveryClient.getInstances("CLOUD-PAYMENT-SERVICE");for (ServiceInstance element : instances) {System.out.println(element.getServiceId() + "\t" + element.getHost() + "\t" + element.getPort() + "\t"+ element.getUri());}return this.discoveryClient;}
边栏推荐
- KingbaseGIS Jin Cang database using manual (6.3. Geometric object creation function)
- 【励志】名言警句
- FreeRTOS任务基础
- 6款跨境电商常用工具汇总
- 【集训DAY5】快速排序【模拟】【数学】
- 微信小程序获取微信用户步数
- Golden Warehouse Database KingbaseGIS User Manual (6.6. Geometric Object Verification Function, 6.7. Spatial Reference System Function)
- 十位时间戳转化成时间
- 如何知道电脑开机记录?
- 探索TiDB Lightning源码来解决发现的bug
猜你喜欢
随机推荐
干货!迈向鲁棒的测试时间适应
蔚来杯2022牛客暑期多校训练营7 CFGJ
ES6 Beginner to Mastery #15: Generator Usage
Golden Warehouse Database KingbaseGIS User Manual (6.6. Geometric Object Verification Function, 6.7. Spatial Reference System Function)
【集训DAY3】挖金矿【二分答案】
[Interface Test] Decoding the request body string of the requests library
KingbaseGIS Jin Cang database using manual (6.3. Geometric object creation function)
ALV报表总结2022.8.9
complete knapsack theory
2022-08-09 mysql/stonedb-subquery performance improvement-introduction
framework源码读后感
关于服务治理
Wireshark经典实践和面试13点总结
32 JZOF 】 【 print down on binary tree
【集训DAY5】选数字【数学】
NotWritableError: The current user does not have write permissions when conda creates a new environment
【集训DAY4】询问【Hash】
Sqlserver restricts the ip under which accounts can access the database
【SSL集训DAY2】有趣的数【数位DP】
Click: 377. Combined Sum Ⅳ