mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
1.1.0
This commit is contained in:
@@ -1,19 +1,21 @@
|
||||
# 快速体验
|
||||
|
||||
> 运行环境:JDK8,Maven3,Zookeeper
|
||||
> 运行环境:JDK8,Maven3,Zookeeper,Mysql
|
||||
|
||||
- 安装并启动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
|
||||
|
||||
|
14
doc/docs/files/10085_ISV管理.md
Normal file
14
doc/docs/files/10085_ISV管理.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# ISV管理
|
||||
|
||||
ISV:独立软体开发商(independent software vendor),即接入方或者说接口调用者,在SOP中称为ISV。
|
||||
|
||||
---
|
||||
|
||||
在1.1.0版本中新增了ISV管理功能,在sop-admin中ISV管理模块下。功能如下:
|
||||
|
||||
- 基本信息的增查改
|
||||
- 设置对应角色
|
||||
|
||||
界面如下图所示:
|
||||
|
||||

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

|
||||
|
||||
- 勾选对应角色,点击保存
|
||||
|
||||

|
||||
|
||||
这里演示的是:具有普通权限的ISV能够访问`permission.story.get`接口,运行`PermissionDemoPostTest`测试用例进行验证
|
@@ -6,7 +6,7 @@ SOP将路由信息存到了zookeeper当中,服务在启动时,将自己的
|
||||
zookeeper存储路由的结构如下:
|
||||
|
||||
```xml
|
||||
/com.gitee.sop.route-<profile> 根节点
|
||||
/com.gitee.sop.route 根节点
|
||||
/serviceId 服务节点,名字为服务名
|
||||
/route1 路由节点,名字为:name+version,存放路由信息
|
||||
/route2
|
||||
|
BIN
doc/docs/files/images/10085_1.png
Normal file
BIN
doc/docs/files/images/10085_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 233 KiB |
BIN
doc/docs/files/images/10090_1.png
Normal file
BIN
doc/docs/files/images/10090_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 327 KiB |
BIN
doc/docs/files/images/10090_2.png
Normal file
BIN
doc/docs/files/images/10090_2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 94 KiB |
Reference in New Issue
Block a user