Merge branch 'master' into registry-nacos

pull/1/head
tanghc 5 years ago
commit 7c90239ef3
  1. 6
      changelog.md
  2. 59
      doc/docs/_sidebar.md
  3. 4
      doc/docs/files/10010_快速体验.md
  4. 104
      doc/docs/files/10109_配置Sleuth链路追踪.md
  5. BIN
      doc/docs/files/images/10109_1.png
  6. 2
      doc/docs/index.html
  7. 2
      sop-1.12.4.sql
  8. 2
      sop-admin/sop-admin-server/pom.xml
  9. 5
      sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/isv/param/IsvInfoForm.java
  10. 3
      sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/isv/result/IsvInfoVO.java
  11. 3
      sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/entity/IsvInfo.java
  12. 2
      sop-admin/sop-admin-server/src/main/resources/application-dev.properties
  13. 2
      sop-admin/sop-admin-server/src/main/resources/public/index.html
  14. 1
      sop-admin/sop-admin-server/src/main/resources/public/static/js/chunk-25908fca.9d8bc0b6.js
  15. 1
      sop-admin/sop-admin-server/src/main/resources/public/static/js/chunk-25908fca.ca176fa6.js
  16. 29
      sop-admin/sop-admin-vue/src/views/isv/index.vue
  17. 2
      sop-common/pom.xml
  18. 4
      sop-common/sop-gateway-common/pom.xml
  19. 2
      sop-common/sop-registry-api/pom.xml
  20. 4
      sop-common/sop-service-common/pom.xml
  21. 2
      sop-example/sop-auth/pom.xml
  22. 2
      sop-example/sop-book/sop-book-web/pom.xml
  23. 2
      sop-example/sop-easyopen/pom.xml
  24. 2
      sop-example/sop-springmvc/pom.xml
  25. 2
      sop-example/sop-story/sop-story-web/pom.xml
  26. 2
      sop-gateway/pom.xml
  27. 4
      sop-gateway/src/main/resources/application-dev.properties
  28. 10
      sop-registry/src/main/resources/application-dev.properties
  29. 2
      sop-website/website-server/pom.xml
  30. 2
      sop-website/website-server/src/main/resources/application-dev.properties
  31. 1
      sop.sql

@ -1,5 +1,11 @@
# changelog
## 1.12.4
- 优化属性文件配置
- 新增sleuth接入文档
- admin的isv列表新增备注字段
## 1.12.3
- 修复删除zk节点导致的BUG

@ -1,31 +1,32 @@
* [首页](/?t=1562744547267)
* [首页](/?t=1563439736156)
* 开发文档
* [快速体验](files/10010_快速体验.md?t=1562744547269)
* [项目接入到SOP](files/10011_项目接入到SOP.md?t=1562744547286)
* [新增接口](files/10020_新增接口.md?t=1562744547286)
* [业务参数校验](files/10030_业务参数校验.md?t=1562744547287)
* [错误处理](files/10040_错误处理.md?t=1562744547287)
* [编写文档](files/10041_编写文档.md?t=1562744547287)
* [接口交互详解](files/10050_接口交互详解.md?t=1562744547287)
* [easyopen支持](files/10070_easyopen支持.md?t=1562744547287)
* [使用签名校验工具](files/10080_使用签名校验工具.md?t=1562744547287)
* [ISV管理](files/10085_ISV管理.md?t=1562744547287)
* [自定义路由](files/10086_自定义路由.md?t=1562744547287)
* [路由授权](files/10090_路由授权.md?t=1562744547287)
* [接口限流](files/10092_接口限流.md?t=1562744547288)
* [监控日志](files/10093_监控日志.md?t=1562744547288)
* [SDK开发](files/10095_SDK开发.md?t=1562744547288)
* [使用SpringCloudGateway](files/10096_使用SpringCloudGateway.md?t=1562744547288)
* [应用授权](files/10097_应用授权.md?t=1562744547288)
* [更改数据节点名称](files/10099_更改数据节点名称.md?t=1562744547288)
* [对接前端](files/10100_对接前端.md?t=1562744547288)
* [自定义过滤器](files/10102_自定义过滤器.md?t=1562744547288)
* [文件上传](files/10104_文件上传.md?t=1562744547289)
* [nacos注册中心](files/10106_nacos注册中心.md?t=1562744547289)
* [扩展其它注册中心](files/10107_扩展其它注册中心.md?t=1562744547289)
* [快速体验](files/10010_快速体验.md?t=1563439736157)
* [项目接入到SOP](files/10011_项目接入到SOP.md?t=1563439736174)
* [新增接口](files/10020_新增接口.md?t=1563439736174)
* [业务参数校验](files/10030_业务参数校验.md?t=1563439736174)
* [错误处理](files/10040_错误处理.md?t=1563439736174)
* [编写文档](files/10041_编写文档.md?t=1563439736174)
* [接口交互详解](files/10050_接口交互详解.md?t=1563439736174)
* [easyopen支持](files/10070_easyopen支持.md?t=1563439736175)
* [使用签名校验工具](files/10080_使用签名校验工具.md?t=1563439736175)
* [ISV管理](files/10085_ISV管理.md?t=1563439736175)
* [自定义路由](files/10086_自定义路由.md?t=1563439736175)
* [路由授权](files/10090_路由授权.md?t=1563439736175)
* [接口限流](files/10092_接口限流.md?t=1563439736175)
* [监控日志](files/10093_监控日志.md?t=1563439736175)
* [SDK开发](files/10095_SDK开发.md?t=1563439736175)
* [使用SpringCloudGateway](files/10096_使用SpringCloudGateway.md?t=1563439736176)
* [应用授权](files/10097_应用授权.md?t=1563439736176)
* [更改数据节点名称](files/10099_更改数据节点名称.md?t=1563439736176)
* [对接前端](files/10100_对接前端.md?t=1563439736176)
* [自定义过滤器](files/10102_自定义过滤器.md?t=1563439736176)
* [文件上传](files/10104_文件上传.md?t=1563439736176)
* [nacos注册中心](files/10106_nacos注册中心.md?t=1563439736176)
* [扩展其它注册中心](files/10107_扩展其它注册中心.md?t=1563439736176)
* [配置Sleuth链路追踪](files/10109_配置Sleuth链路追踪.md?t=1563439736176)
* 原理分析
* [原理分析之@ApiMapping](files/90010_原理分析之@ApiMapping.md?t=1562744547289)
* [原理分析之路由存储](files/90011_原理分析之路由存储.md?t=1562744547289)
* [原理分析之如何路由](files/90012_原理分析之如何路由.md?t=1562744547289)
* [原理分析之文档归纳](files/90013_原理分析之文档归纳.md?t=1562744547289)
* [常见问题](files/90100_常见问题.md?t=1562744547289)
* [原理分析之@ApiMapping](files/90010_原理分析之@ApiMapping.md?t=1563439736177)
* [原理分析之路由存储](files/90011_原理分析之路由存储.md?t=1563439736177)
* [原理分析之如何路由](files/90012_原理分析之如何路由.md?t=1563439736177)
* [原理分析之文档归纳](files/90013_原理分析之文档归纳.md?t=1563439736177)
* [常见问题](files/90100_常见问题.md?t=1563439736177)

@ -6,15 +6,15 @@
- 执行Mysql脚本`sop.sql`
- IDE安装lombok插件,然后打开项目(IDEA下可以打开根pom.xml,然后open as project)
- 启动注册中心,sop-registry(运行SopRegistryApplication.java)
- 启动网关:打开sop-gateway下的`application-dev.properties`,修改数据库`username/password`,指定zookeeper地址,运行`SopGatewayApplication.java`
- 启动微服务:sop-story-web(运行SopStoryApplication.java)
- 启动网关:打开sop-gateway下的`application-dev.yml`,修改数据库`username/password`,运行`SopGatewayApplication.java`
- 找到sop-test,打开测试用例,进行接口调用测试,运行com.gitee.sop.AlipayClientPostTest.testPost()
确保注册中心先启动
## 使用admin
- 找到`sop-admin/sop-admin-server`工程,打开sop-admin-server下的`application-dev.yml`,修改数据库`username/password`
- 找到`sop-admin/sop-admin-server`工程,打开sop-admin-server下的`application-dev.properties`,修改相关配置
- 运行`com.gitee.sop.adminserver.SopAdminServerApplication.java`
- 访问:`http://localhost:8082`

@ -0,0 +1,104 @@
# 配置Sleuth链路追踪
配置了Sleuth可以很方便查看微服务的调用路线图,可快速定位问题。
SOP基于SpringCloud,因此只要整合[Spring Cloud Sleuth](https://spring.io/projects/spring-cloud-sleuth)即可。
除此之外,还需要支持dubbo的链路的跟踪,Sleuth在2.0已经对dubbo做了支持,详见:[brave-instrumentation-dubbo-rpc](https://github.com/openzipkin/brave/tree/master/instrumentation/dubbo-rpc)
接入Spring Cloud Sleuth步骤如下:
- 下载zipkin服务器
以mac环境为例,执行下面命令,下载jar并启动zipkin服务
```
curl -sSL https://zipkin.io/quickstart.sh | bash -s
java -jar zipkin.jar
```
默认端口是9411,更多安装方式详见:[quickstart](https://zipkin.io/pages/quickstart.html)
- sop-gateway/pom.xml添加依赖
```xml
<!--开启zipkin服务链路跟踪-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
```
配置文件新增
```properties
# zipkin服务跟踪
spring.zipkin.base-url=http://127.0.0.1:9411/
# 设置sleuth收集信息的比率,默认0.1,最大是1,数字越大越耗性能
spring.sleuth.sampler.probability=1
```
重启sop-gateway
- 打开sop-story-web/pom.xml
添加依赖:
```xml
<!--开启zipkin服务链路跟踪-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
<!-- zipkin支持dubbo -->
<dependency>
<groupId>io.zipkin.brave</groupId>
<artifactId>brave-instrumentation-dubbo-rpc</artifactId>
<version>5.6.6</version>
</dependency>
```
配置文件新增:
```properties
# zipkin服务跟踪
spring.zipkin.base-url=http://127.0.0.1:9411/
# 设置sleuth收集信息的比率,默认0.1,最大是1,数字越大越耗性能
spring.sleuth.sampler.probability=1
# dubbo使用zipkin过滤器
dubbo.provider.filter=tracing
dubbo.consumer.filter=tracing
```
重启服务
- 打开sop-book/sop-book-web/pom.xml
步骤同上
- 运行DubboDemoTest.java单元测试
运行完毕看控制台,找到日志信息
```text
2019-07-18 16:22:04.438 INFO [story-service,59dae98250b276bd,60828035658f175f,true] 90553 --- [:12345-thread-2] c.g.s.s.service.DefaultDemoService : dubbo provider, param: DemoParam(id=222)
```
日志内容多了`[story-service,59dae98250b276bd,60828035658f175f,true]`部分,这些是zipkin加进去的,说明如下:
```text
story-service:服务名称
59dae98250b276bd:traceId
60828035658f175f:spanId
true:是否上传到zipkin服务器
```
查看各个服务的控制台,可以发现traceId是一致的。
- 浏览器打开:http://127.0.0.1:9411/
将traceId复制黏贴到右上角文本框进行查询,可看到服务调用链。
![预览](images/10109_1.png "10109_1.png")

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

@ -38,7 +38,7 @@
loadSidebar: true,
loadNavbar: false,
mergeNavbar: true,
maxLevel: 4,
maxLevel: 3,
subMaxLevel: 2,
ga: 'UA-106147152-1',
name: '',

@ -0,0 +1,2 @@
ALTER TABLE `sop`.`isv_info` ADD COLUMN `remark` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注' AFTER `sign_type`;

@ -30,7 +30,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-registry-api</artifactId>
<version>1.12.3-SNAPSHOT</version>
<version>1.12.4-SNAPSHOT</version>
</dependency>
<!-- easyopen starter -->

@ -2,6 +2,7 @@ package com.gitee.sop.adminserver.api.isv.param;
import com.gitee.easyopen.doc.annotation.ApiDocField;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.util.Collections;
import java.util.List;
@ -16,6 +17,10 @@ public class IsvInfoForm {
@ApiDocField(description = "状态:0:启用,1:禁用")
private Byte status = 0;
@ApiDocField(description = "备注")
@Length(max = 100, message = "长度不得唱过100")
private String remark;
@ApiDocField(description = "roleCode数组", elementClass = String.class)
private List<String> roleCode = Collections.emptyList();
}

@ -26,6 +26,9 @@ public class IsvInfoVO {
@ApiDocField(description = "签名类型:1:RSA2,2:MD5")
private Byte signType;
@ApiDocField(description = "备注")
private String remark;
/** 数据库字段:gmt_create */
@ApiDocField(description = "添加时间")
private Date gmtCreate;

@ -40,6 +40,9 @@ public class IsvInfo {
/** 1启用,2禁用, 数据库字段:status */
private Byte status;
/** 备注,数据库字段:remark */
private String remark;
/** 数据库字段:gmt_create */
private Date gmtCreate;

@ -16,8 +16,6 @@ zookeeper.url=localhost:2181
zipkin.url=http://127.0.0.1:9411/
# ------- 需要改的配置end -------
######### 下面的配置基本不用改 #########
# token过期时间,分钟
admin.access-token.timeout-minutes=30
# 签名方式,rsa:支付宝开放平台签名方式,md5:淘宝开放平台签名方式

@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><link rel=icon href=favicon.ico><title>SOP Admin</title><link href=static/css/chunk-elementUI.81cf475c.css rel=stylesheet><link href=static/css/chunk-libs.3dfb7769.css rel=stylesheet><link href=static/css/app.4f0872ef.css rel=stylesheet></head><body><noscript><strong>We're sorry but SOP Admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script>(function(e){function t(t){for(var r,c,a=t[0],i=t[1],f=t[2],l=0,d=[];l<a.length;l++)c=a[l],u[c]&&d.push(u[c][0]),u[c]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);h&&h(t);while(d.length)d.shift()();return o.push.apply(o,f||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,c=1;c<n.length;c++){var a=n[c];0!==u[a]&&(r=!1)}r&&(o.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},c={runtime:0},u={runtime:0},o=[];function a(e){return i.p+"static/js/"+({}[e]||e)+"."+{"chunk-009073d4":"28312808","chunk-238a81e9":"5955f13d","chunk-25908fca":"9d8bc0b6","chunk-29e7142c":"994a3ac0","chunk-2d2085ef":"a63a74dc","chunk-2d22c2e3":"4a098244","chunk-37401378":"4e39ec9b","chunk-4a59cbe4":"a6360c68","chunk-6a68a33e":"b6685cb9","chunk-73b2dcec":"14f248eb"}[e]+".js"}function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(e){var t=[],n={"chunk-009073d4":1,"chunk-238a81e9":1,"chunk-25908fca":1,"chunk-29e7142c":1,"chunk-37401378":1,"chunk-6a68a33e":1,"chunk-73b2dcec":1};c[e]?t.push(c[e]):0!==c[e]&&n[e]&&t.push(c[e]=new Promise(function(t,n){for(var r="static/css/"+({}[e]||e)+"."+{"chunk-009073d4":"0af16c7e","chunk-238a81e9":"e8e2beee","chunk-25908fca":"89ab33e8","chunk-29e7142c":"d10599db","chunk-2d2085ef":"31d6cfe0","chunk-2d22c2e3":"31d6cfe0","chunk-37401378":"a43114f3","chunk-4a59cbe4":"31d6cfe0","chunk-6a68a33e":"3b12267b","chunk-73b2dcec":"99cf6327"}[e]+".css",u=i.p+r,o=document.getElementsByTagName("link"),a=0;a<o.length;a++){var f=o[a],l=f.getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(l===r||l===u))return t()}var d=document.getElementsByTagName("style");for(a=0;a<d.length;a++){f=d[a],l=f.getAttribute("data-href");if(l===r||l===u)return t()}var h=document.createElement("link");h.rel="stylesheet",h.type="text/css",h.onload=t,h.onerror=function(t){var r=t&&t.target&&t.target.src||u,o=new Error("Loading CSS chunk "+e+" failed.\n("+r+")");o.code="CSS_CHUNK_LOAD_FAILED",o.request=r,delete c[e],h.parentNode.removeChild(h),n(o)},h.href=u;var s=document.getElementsByTagName("head")[0];s.appendChild(h)}).then(function(){c[e]=0}));var r=u[e];if(0!==r)if(r)t.push(r[2]);else{var o=new Promise(function(t,n){r=u[e]=[t,n]});t.push(r[2]=o);var f,l=document.createElement("script");l.charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.src=a(e),f=function(t){l.onerror=l.onload=null,clearTimeout(d);var n=u[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src,o=new Error("Loading chunk "+e+" failed.\n("+r+": "+c+")");o.type=r,o.request=c,n[1](o)}u[e]=void 0}};var d=setTimeout(function(){f({type:"timeout",target:l})},12e4);l.onerror=l.onload=f,document.head.appendChild(l)}return Promise.all(t)},i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i.oe=function(e){throw console.error(e),e};var f=window["webpackJsonp"]=window["webpackJsonp"]||[],l=f.push.bind(f);f.push=t,f=f.slice();for(var d=0;d<f.length;d++)t(f[d]);var h=l;n()})([]);</script><script src=static/js/chunk-elementUI.8ebdfbab.js></script><script src=static/js/chunk-libs.9cf9cc40.js></script><script src=static/js/app.095e8b9c.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><link rel=icon href=favicon.ico><title>SOP Admin</title><link href=static/css/chunk-elementUI.81cf475c.css rel=stylesheet><link href=static/css/chunk-libs.3dfb7769.css rel=stylesheet><link href=static/css/app.4f0872ef.css rel=stylesheet></head><body><noscript><strong>We're sorry but SOP Admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script>(function(e){function t(t){for(var r,c,o=t[0],i=t[1],f=t[2],l=0,d=[];l<o.length;l++)c=o[l],u[c]&&d.push(u[c][0]),u[c]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);h&&h(t);while(d.length)d.shift()();return a.push.apply(a,f||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],r=!0,c=1;c<n.length;c++){var o=n[c];0!==u[o]&&(r=!1)}r&&(a.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},c={runtime:0},u={runtime:0},a=[];function o(e){return i.p+"static/js/"+({}[e]||e)+"."+{"chunk-009073d4":"28312808","chunk-238a81e9":"5955f13d","chunk-25908fca":"ca176fa6","chunk-29e7142c":"994a3ac0","chunk-2d2085ef":"a63a74dc","chunk-2d22c2e3":"4a098244","chunk-37401378":"4e39ec9b","chunk-4a59cbe4":"a6360c68","chunk-6a68a33e":"b6685cb9","chunk-73b2dcec":"14f248eb"}[e]+".js"}function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(e){var t=[],n={"chunk-009073d4":1,"chunk-238a81e9":1,"chunk-25908fca":1,"chunk-29e7142c":1,"chunk-37401378":1,"chunk-6a68a33e":1,"chunk-73b2dcec":1};c[e]?t.push(c[e]):0!==c[e]&&n[e]&&t.push(c[e]=new Promise(function(t,n){for(var r="static/css/"+({}[e]||e)+"."+{"chunk-009073d4":"0af16c7e","chunk-238a81e9":"e8e2beee","chunk-25908fca":"89ab33e8","chunk-29e7142c":"d10599db","chunk-2d2085ef":"31d6cfe0","chunk-2d22c2e3":"31d6cfe0","chunk-37401378":"a43114f3","chunk-4a59cbe4":"31d6cfe0","chunk-6a68a33e":"3b12267b","chunk-73b2dcec":"99cf6327"}[e]+".css",u=i.p+r,a=document.getElementsByTagName("link"),o=0;o<a.length;o++){var f=a[o],l=f.getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(l===r||l===u))return t()}var d=document.getElementsByTagName("style");for(o=0;o<d.length;o++){f=d[o],l=f.getAttribute("data-href");if(l===r||l===u)return t()}var h=document.createElement("link");h.rel="stylesheet",h.type="text/css",h.onload=t,h.onerror=function(t){var r=t&&t.target&&t.target.src||u,a=new Error("Loading CSS chunk "+e+" failed.\n("+r+")");a.code="CSS_CHUNK_LOAD_FAILED",a.request=r,delete c[e],h.parentNode.removeChild(h),n(a)},h.href=u;var s=document.getElementsByTagName("head")[0];s.appendChild(h)}).then(function(){c[e]=0}));var r=u[e];if(0!==r)if(r)t.push(r[2]);else{var a=new Promise(function(t,n){r=u[e]=[t,n]});t.push(r[2]=a);var f,l=document.createElement("script");l.charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.src=o(e),f=function(t){l.onerror=l.onload=null,clearTimeout(d);var n=u[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src,a=new Error("Loading chunk "+e+" failed.\n("+r+": "+c+")");a.type=r,a.request=c,n[1](a)}u[e]=void 0}};var d=setTimeout(function(){f({type:"timeout",target:l})},12e4);l.onerror=l.onload=f,document.head.appendChild(l)}return Promise.all(t)},i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i.oe=function(e){throw console.error(e),e};var f=window["webpackJsonp"]=window["webpackJsonp"]||[],l=f.push.bind(f);f.push=t,f=f.slice();for(var d=0;d<f.length;d++)t(f[d]);var h=l;n()})([]);</script><script src=static/js/chunk-elementUI.8ebdfbab.js></script><script src=static/js/chunk-libs.9cf9cc40.js></script><script src=static/js/app.095e8b9c.js></script></body></html>

@ -37,6 +37,8 @@
<el-table-column
prop="roleList"
label="角色"
width="100"
show-overflow-tooltip="true"
>
<template slot-scope="scope">
<div v-html="roleRender(scope.row)"></div>
@ -62,6 +64,12 @@
label="修改时间"
width="160"
/>
<el-table-column
prop="remark"
label="备注"
width="120"
show-overflow-tooltip="true"
/>
<el-table-column
label="操作"
width="150"
@ -106,6 +114,9 @@
<el-checkbox v-for="item in roles" :key="item.roleCode" :label="item.roleCode">{{ item.description }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="isvDialogFormData.remark" type="textarea" />
</el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="isvDialogFormData.status">
<el-radio :label="1" name="status">启用</el-radio>
@ -115,7 +126,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="isvDialogVisible = false"> </el-button>
<el-button type="primary" @click="onIsvDialogSave"> </el-button>
<el-button type="primary" :disabled="isSaveButtonDisabled" @click="onIsvDialogSave"> </el-button>
</div>
</el-dialog>
<!--view keys dialog-->
@ -200,14 +211,15 @@ export default {
isvDialogFormData: {
id: 0,
status: 1,
remark: '',
roleCode: []
},
rulesIsvForm: {
appKey: [
{ required: true, message: '不能为空', trigger: 'blur' },
{ min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: 'blur' }
remark: [
{ min: 0, max: 100, message: '长度在 1 到 100 个字符', trigger: 'blur' }
]
},
isSaveButtonDisabled: false,
isvKeysDialogVisible: false,
isvKeysFormData: {
appKey: '',
@ -283,19 +295,20 @@ export default {
})
},
onIsvDialogSave: function() {
const that = this
this.$refs.isvForm.validate((valid) => {
if (valid) {
this.isSaveButtonDisabled = true
const uri = this.isvDialogFormData.id === 0 ? 'isv.info.add' : 'isv.info.update'
that.post(uri, that.isvDialogFormData, function() {
that.isvDialogVisible = false
that.loadTable()
this.post(uri, this.isvDialogFormData, function() {
this.isvDialogVisible = false
this.loadTable()
})
}
})
},
onIsvDialogClose: function() {
this.resetForm('isvForm')
this.isSaveButtonDisabled = false
this.isvDialogFormData.status = 1
this.isvDialogFormData.roleCode = []
},

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-common</artifactId>
<version>1.12.3-SNAPSHOT</version>
<version>1.12.4-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>

@ -5,11 +5,11 @@
<parent>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-common</artifactId>
<version>1.12.3-SNAPSHOT</version>
<version>1.12.4-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>sop-gateway-common</artifactId>
<version>1.12.3-SNAPSHOT</version>
<version>1.12.4-SNAPSHOT</version>
<packaging>jar</packaging>
<name>sop-gateway-common</name>

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-registry-api</artifactId>
<version>1.12.3-SNAPSHOT</version>
<version>1.12.4-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

@ -6,11 +6,11 @@
<parent>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-common</artifactId>
<version>1.12.3-SNAPSHOT</version>
<version>1.12.4-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>sop-service-common</artifactId>
<version>1.12.3-SNAPSHOT</version>
<version>1.12.4-SNAPSHOT</version>
<packaging>jar</packaging>
<name>sop-service-common</name>

@ -26,7 +26,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-service-common</artifactId>
<version>1.12.3-SNAPSHOT</version>
<version>1.12.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>

@ -24,7 +24,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-service-common</artifactId>
<version>1.12.3-SNAPSHOT</version>
<version>1.12.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.gitee.sop</groupId>

@ -29,7 +29,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-service-common</artifactId>
<version>1.12.3-SNAPSHOT</version>
<version>1.12.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>

@ -20,7 +20,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-service-common</artifactId>
<version>1.12.3-SNAPSHOT</version>
<version>1.12.4-SNAPSHOT</version>
</dependency>
<!-- eureka 服务发现 -->
<dependency>

@ -24,7 +24,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-service-common</artifactId>
<version>1.12.3-SNAPSHOT</version>
<version>1.12.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.gitee.sop</groupId>

@ -23,7 +23,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-gateway-common</artifactId>
<version>1.12.3-SNAPSHOT</version>
<version>1.12.4-SNAPSHOT</version>
</dependency>
<!-- ↓↓↓ 使用spring cloud zuul ↓↓↓ -->

@ -1,4 +1,5 @@
server.port=8081
spring.application.name=api-gateway
# ------- 需要改的配置 -------
# mysql数据库账号
@ -15,9 +16,6 @@ nacos.url=127.0.0.1:8848
zipkin.url=http://127.0.0.1:9411/
# ------- 需要改的配置end -------
######### 下面的配置基本不用改 #########
spring.application.name=api-gateway
# 入口地址,不用改,默认是/zuul
zuul.servlet-path=/api
# 禁用默认的过滤器,不能删,不用改

@ -1,14 +1,6 @@
server.port=1111
spring.application.name=sop-registry
# ------- 需要改的配置 -------
# eureka注册中心地址
eureka.url=http://localhost:1111/eureka/
# ------- 需要改的配置end -------
######### 下面的配置基本不用改 #########
eureka.client.fetch-registry=false
eureka.client.register-with-eureka=false
eureka.client.serviceUrl.defaultZone=${eureka.url}
eureka.client.serviceUrl.defaultZone=http://localhost:1111/eureka/

@ -25,7 +25,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-registry-api</artifactId>
<version>1.12.3-SNAPSHOT</version>
<version>1.12.4-SNAPSHOT</version>
</dependency>
<dependency>

@ -12,7 +12,7 @@ nacos.url=127.0.0.1:8848
# ------- 需要改的配置end -------
# 注册中心地址,根据实际情况改,这里只是参数,并不会去注册
# eureka注册中心地址,这里只是参数,并不会去注册
registry.eureka-server-addr=${eureka.url}
# nacos服务器地址
registry.nacos-server-addr=${nacos.url}

@ -83,6 +83,7 @@ CREATE TABLE `isv_info` (
`pri_key` text COMMENT '私钥',
`status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '1启用,2禁用',
`sign_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1:RSA2,2:MD5',
`remark` varchar(128) DEFAULT NULL COMMENT '备注',
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),

Loading…
Cancel
Save