This commit is contained in:
tanghc
2021-03-17 14:50:36 +08:00
parent 1b19b65d81
commit db9a2f4e23

View File

@@ -93,6 +93,8 @@ public class OpenServiceConfig extends AlipayServiceConfiguration {
php应用提供的接口需要返回如下json内容
假设请求的接口为:`http://open.xxx.com/get_routes`
```json
{
"serviceId": "goods-service",
@@ -157,7 +159,7 @@ instance.setServiceName("goods-service");
instance.setIp("192.168.0.11");
instance.setPort(8080);
// 在nacos的metadata中指定接口路径
instance.getMetadata().put("sop.routes.path", "/goods/list_goods");
instance.getMetadata().put("sop.routes.path", "http://open.xxx.com/get_routes");
namingService.registerInstance(serviceId, instance);
```