当前位置:网站首页>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;} 

边栏推荐
- 【渗透工具】浏览器数据导出工具
- 【SSL集训DAY2】Sequence【数学】
- 基于 RocksDB 实现高可靠、低时延的 MQTT 数据持久化
- Gumbel distribution of discrete choice model
- 金仓数据库 KingbaseGIS 使用手册(6.5. 几何对象编辑函数)
- 领跑政务云,连续五年中国第一
- Wireshark经典实践和面试13点总结
- CAD 绘制圆角处理
- 68. qt quick-qml multi-level folding drop-down navigation menu supports dynamic add/unload, support qml/widget loading, etc.
- 781. 森林中的兔子
猜你喜欢
随机推荐
complete knapsack theory
多商户商城系统功能拆解24讲-平台端分销会员
全面解析FPGA基础知识
ALV报表总结2022.8.9
ES6 从入门到精通 # 15:生成器 Generator 的用法
781. 森林中的兔子
力扣:474.一和零
How to know the computer boot record?
【集训DAY4】矩形【线段树】
深圳堡垒机厂家有哪些?重点推荐哪家?
AppUser object extension based on ABP
微信小程序获取微信用户步数
Technology feast!Huayun Data brings six topics to OpenInfra Days China
AirFlow介绍
conda新建环境时报错NotWritableError: The current user does not have write permissions
基于ABP的AppUser对象扩展
什么是平面文件数据库? 如何导入多种格式的文件:DSV、JSON、XML?
Wireshark classic practice and interview 13-point summary
金仓数据库 KingbaseGIS 使用手册(6.6. 几何对象校验函数、6.7. 空间参考系函数)
如何正则匹配乱码?









