This commit is contained in:
tanghc
2019-04-01 20:57:56 +08:00
parent 78f85256d6
commit 43c72530d3
109 changed files with 2586 additions and 386 deletions

View File

@@ -1,19 +1,21 @@
# 快速体验
> 运行环境JDK8Maven3Zookeeper
> 运行环境JDK8Maven3ZookeeperMysql
- 安装并启动zookeeper[安装教程](http://zookeeper.apache.org/doc/r3.4.13/zookeeperStarted.html)
- 执行Mysql脚本`sop.sql`
- IDE打开项目(IDEA下可以打开根pom.xml然后open as project)
- 启动注册中心sop-registry运行SopRegistryApplication.java
- 启动微服务sop-story-web(运行SopStoryApplication.java)
- 启动网关sop-gateway(运行SopGatewayApplication.java
- 启动网关:打开sop-gateway下的`application.yml`,修改数据库`username/password`SopGatewayApplication.java
- 找到sop-test打开测试用例进行接口调用测试运行com.gitee.sop.AlipayClientPostTest.testPost()
确保注册中心先启动
## 使用admin
- 找到`sop-admin/sop-admin-server`工程,运行`com.gitee.sop.adminserver.SopAdminServerApplication.java`
- 找到`sop-admin/sop-admin-server`工程,打开sop-admin-server下的`application-dev.yml`,修改数据库`username/password`
- 运行`com.gitee.sop.adminserver.SopAdminServerApplication.java`
- 找到`sop-admin/sop-admin-front/index.html`文件在IDEA下直接右键--Run'index.html'
- 如果没有用到IDEA则需要把sop-admin-front放到静态服务器中然后访问index.html

View File

@@ -0,0 +1,14 @@
# ISV管理
ISV独立软体开发商independent software vendor即接入方或者说接口调用者在SOP中称为ISV。
---
在1.1.0版本中新增了ISV管理功能在sop-admin中ISV管理模块下。功能如下
- 基本信息的增查改
- 设置对应角色
界面如下图所示:
![admin预览](images/10085_1.png "10085_1.png")

View File

@@ -0,0 +1,25 @@
# 路由授权
1.1.0版本新增了路由授权功能采用RBAC权限管理方式实现。
- 每个ISVappKey对应一个或多个角色
- 每个角色分配多个路由权限
接口跟角色相关联ISV拥有哪些角色就具有角色对应的接口访问权限。
假设把路由a,b,c分配给了`VIP角色`那么具有VIP角色的ISV可以访问a,b,c三个路由。
默认情况下接口访问时公开的ISV都能访问。如果要设置某个接口需要授权`@ApiMapping`注解中指定permission=true。
如:`@ApiMapping(value = "permission.story.get", permission = true)`。这样该接口是需要经过授权给ISV才能访问的。
重启服务后登录admin服务管理-路由列表界面中,操作操作列会出现一个授权按钮,点击出现授权窗口,勾选对应的角色即可完成授权。
- 点击`授权`按钮,进行角色授权
![admin预览](images/10090_1.png "10090_1.png")
- 勾选对应角色,点击保存
![admin预览](images/10090_2.png "10090_2.png")
这里演示的是具有普通权限的ISV能够访问`permission.story.get`接口,运行`PermissionDemoPostTest`测试用例进行验证

View File

@@ -6,7 +6,7 @@ SOP将路由信息存到了zookeeper当中服务在启动时将自己的
zookeeper存储路由的结构如下
```xml
/com.gitee.sop.route-<profile> 根节点
/com.gitee.sop.route 根节点
/serviceId 服务节点,名字为服务名
/route1 路由节点名字为name+version存放路由信息
/route2

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB