This commit is contained in:
tanghc
2019-08-26 12:45:37 +08:00
parent 3446a32bdf
commit 45f3eb8f89
26 changed files with 62 additions and 111 deletions

View File

@@ -1,23 +0,0 @@
# 自定义路由
假设有一个非java开发的接口比如php开发的接口然后需要接入到SOP使用接口名版本号进行路由跳转。
操作方式如下:
- 登录sop-admin服务管理--路由管理
- 新建一个自定义服务:`php-service`
![新建一个自定义服务](images/10086_1.png "10086_1.png")
- 选中php-service新建一个路由输入接口名、版本号、uri
![新建一个路由](images/10086_2.png "10086_2.png")
- 请求网关
`http://localhost:8081/api?method=php.goods.list&version=1.0`会跳转到`http://www.xxx.com/api/listGoods.php`
注意:
- php接口返回数据必须是json格式返回其它内容可能会调用失败
- 只有自定义服务、路由可以删除