mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
4.3.0
This commit is contained in:
@@ -93,6 +93,8 @@ public class OpenServiceConfig extends AlipayServiceConfiguration {
|
|||||||
|
|
||||||
php应用提供的接口需要返回如下json内容:
|
php应用提供的接口需要返回如下json内容:
|
||||||
|
|
||||||
|
假设请求的接口为:`http://open.xxx.com/get_routes`
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"serviceId": "goods-service",
|
"serviceId": "goods-service",
|
||||||
@@ -157,7 +159,7 @@ 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中指定接口路径
|
||||||
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);
|
namingService.registerInstance(serviceId, instance);
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user