|
|
@ -93,16 +93,16 @@ php应用提供的接口需要返回如下json内容: |
|
|
|
|
|
|
|
|
|
|
|
```json |
|
|
|
```json |
|
|
|
{ |
|
|
|
{ |
|
|
|
"serviceId": "story-service", |
|
|
|
"serviceId": "goods-service", |
|
|
|
"createTime": 1568603471646, |
|
|
|
"createTime": 1568603471646, |
|
|
|
"updateTime": 1568603471646, |
|
|
|
"updateTime": 1568603471646, |
|
|
|
"description": null, |
|
|
|
"description": null, |
|
|
|
"routeDefinitionList": [ |
|
|
|
"routeDefinitionList": [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
"id": "alipay.category.get1.0", |
|
|
|
"id": "goods.list1.0", |
|
|
|
"name": "alipay.category.get", |
|
|
|
"name": "goods.list", |
|
|
|
"version": "1.0", |
|
|
|
"version": "1.0", |
|
|
|
"uri": "lb://story-service", |
|
|
|
"uri": "lb://goods-service", |
|
|
|
"path": "/goods/list_goods", |
|
|
|
"path": "/goods/list_goods", |
|
|
|
"order": 0, |
|
|
|
"order": 0, |
|
|
|
"ignoreValidate": 0, |
|
|
|
"ignoreValidate": 0, |
|
|
@ -132,7 +132,7 @@ routeDefinitionList元素参数说明 |
|
|
|
|id |是|路由id,全局唯一,格式:接口名+版本号 | |
|
|
|
|id |是|路由id,全局唯一,格式:接口名+版本号 | |
|
|
|
|name|是|接口名称| |
|
|
|
|name|是|接口名称| |
|
|
|
|version|是|版本号| |
|
|
|
|version|是|版本号| |
|
|
|
|uri|是|格式:lb:// + serviceId,如:lb://order-service| |
|
|
|
|uri|是|格式:lb:// + serviceId,如:lb://goods-service| |
|
|
|
|path|是|接口path,填端口号后面的path,如你的接口为`http://open.domain.com:8080/goods/list_goods`,填:`/goods/list_goods`| |
|
|
|
|path|是|接口path,填端口号后面的path,如你的接口为`http://open.domain.com:8080/goods/list_goods`,填:`/goods/list_goods`| |
|
|
|
|order|是|固定填:0| |
|
|
|
|order|是|固定填:0| |
|
|
|
|ignoreValidate|是|忽略签名验证,1:是,0:否| |
|
|
|
|ignoreValidate|是|忽略签名验证,1:是,0:否| |
|
|
@ -151,7 +151,7 @@ routeDefinitionList元素参数说明 |
|
|
|
|
|
|
|
|
|
|
|
```java |
|
|
|
```java |
|
|
|
Instance instance = new Instance(); |
|
|
|
Instance instance = new Instance(); |
|
|
|
instance.setServiceName("order-service"); |
|
|
|
instance.setServiceName("goods-service"); |
|
|
|
instance.setIp("192.168.0.11"); |
|
|
|
instance.setIp("192.168.0.11"); |
|
|
|
instance.setPort(8080); |
|
|
|
instance.setPort(8080); |
|
|
|
// 在nacos的metadata中指定接口路径 |
|
|
|
// 在nacos的metadata中指定接口路径 |
|
|
|