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

边栏推荐
猜你喜欢

ES6 从入门到精通 # 13:数组的扩展方法二

Gumbel distribution of discrete choice model

AUTOCAD——形位公差如何标注、CAD打断于点的操作

什么是平面文件数据库? 如何导入多种格式的文件:DSV、JSON、XML?

你的手机曾经被监控过吗?

How to know the computer boot record?
![[Cloud Native] This article explains how to add Tencent Crane to Kubevela addon](/img/42/384caec048e02f01461292afc931be.jpg)
[Cloud Native] This article explains how to add Tencent Crane to Kubevela addon

如何正则匹配乱码?

【接口测试】requests 库请求体字符串解码

32 JZOF 】 【 print down on binary tree
随机推荐
力扣:518. 零钱兑换 II
微信小程序获取微信用户步数
[JZOF] 82 binary tree with a path of a certain value (1)
ES6 从入门到精通 # 13:数组的扩展方法二
Filament-Material 绘制基本图形
Gold Warehouse Database KingbaseGIS User Manual (6.2. Management Functions)
The latest "Grain Academy Development Tutorial" in 2022: 10 - Front-end payment module
《GB5084-2021》PDF下载
LiveData : Transformations.map和 Transformations.switchMap用法
【渗透工具】浏览器数据导出工具
Technology feast!Huayun Data brings six topics to OpenInfra Days China
Force Buckle: 474. Ones and zeros
harbor配置远程仓库
多商户商城系统功能拆解25讲-平台端分销申请
【mysql】查询今天9点
上海一科技公司刷单被罚22万,揭露网络刷单灰色产业链
离散选择模型之Gumbel分布
南大通用数据库-Gbase-8a-学习-04-部署分布式集群
2022-08-09 mysql/stonedb-subquery performance improvement-introduction
【集训DAY3】挖金矿【二分答案】