Merge branch 'master' into eureka

eureka
tanghc 5 years ago
commit 1d12257105
  1. 9
      doc/docs/files/90100_常见问题.md
  2. 2
      sop-auth/pom.xml
  3. 2
      sop-common/pom.xml
  4. 4
      sop-common/sop-gateway-common/pom.xml
  5. 4
      sop-common/sop-service-common/pom.xml
  6. 2
      sop-example/sop-book/sop-book-web/pom.xml
  7. 2
      sop-example/sop-easyopen/pom.xml
  8. 2
      sop-example/sop-springmvc/pom.xml
  9. 2
      sop-example/sop-story/sop-story-web/pom.xml
  10. 2
      sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/controller/TraditionalWebappController.java
  11. 2
      sop-gateway/pom.xml
  12. 4
      sop-gateway/src/main/java/com/gitee/sop/gateway/manager/DbRoutesProcessor.java
  13. 2
      sop-gateway/src/main/resources/application-dev.properties
  14. 4
      sop-sdk/sdk-java/src/main/java/com/gitee/sop/sdk/request/BaseRequest.java
  15. 2
      sop-website/pom.xml

@ -129,3 +129,12 @@ sop.service.exclude=your-serviceId1,your-serviceId2
# 多个正则用英文分号(;)隔开
sop.service.exclude-regex=test\\-.*
```
## ISV公私钥 & 平台公私钥
```java
ISV私钥(必须):ISV保存,用来生成签名 --> ISV公钥(必须):平台保存,用来校验签名是否正确
平台私钥(非必须):平台保存,对返回结果生成签名 --> 平台公钥(非必须):ISV保存,用来校验签名是否正确
```
总结:私钥负责加密生成签名,公钥负责校验签名是否正确

@ -26,7 +26,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-service-common</artifactId>
<version>2.5.6-SNAPSHOT</version>
<version>2.5.7-SNAPSHOT</version>
</dependency>
<!-- sop相关配置 end-->

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

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

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

@ -28,7 +28,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-service-common</artifactId>
<version>2.5.6-SNAPSHOT</version>
<version>2.5.7-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>2.5.6-SNAPSHOT</version>
<version>2.5.7-SNAPSHOT</version>
</dependency>
<!-- 使用nacos注册中心

@ -20,7 +20,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-service-common</artifactId>
<version>2.5.6-SNAPSHOT</version>
<version>2.5.7-SNAPSHOT</version>
</dependency>
<!-- nacos -->
<dependency>

@ -28,7 +28,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-service-common</artifactId>
<version>2.5.6-SNAPSHOT</version>
<version>2.5.7-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.gitee.sop</groupId>

@ -84,6 +84,8 @@ public class TraditionalWebappController {
public Food getById(@PathVariable("id") Integer id) {
Food food = new Food();
food.setId(id);
food.setName("香蕉");
food.setPrice(BigDecimal.valueOf(100));
return food;
}

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

@ -8,9 +8,9 @@ import com.gitee.sop.gatewaycommon.bean.InstanceDefinition;
import com.gitee.sop.gatewaycommon.bean.ServiceRouteInfo;
import com.gitee.sop.gatewaycommon.route.RoutesProcessor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.stream.Collectors;
@ -62,7 +62,9 @@ public class DbRoutesProcessor implements RoutesProcessor {
// 删除serviceId下所有的路由
this.removeAllRoutes(serviceId);
if (CollectionUtils.isNotEmpty(configServiceRoutes)) {
// 批量保存
configServiceRouteMapper.saveBatch(configServiceRoutes);
}
}
}

@ -18,6 +18,8 @@ zipkin.url=http://127.0.0.1:9411/
pre.domain=localhost
# ------- 需要改的配置end -------
sop.restful.enable=true
# 入口地址,不用改,默认是/zuul
zuul.servlet-path=/api
# 禁用默认的过滤器,不能删,不用改

@ -36,10 +36,12 @@ import java.util.Map;
*/
public abstract class BaseRequest<T extends BaseResponse> {
private static final String EMPTY_JSON = "{}";
private String method;
private String version;
private String bizContent;
private String bizContent = EMPTY_JSON;
private Object bizModel;
/**

@ -35,7 +35,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-gateway-common</artifactId>
<version>2.5.6-SNAPSHOT</version>
<version>2.5.7-SNAPSHOT</version>
</dependency>
<dependency>

Loading…
Cancel
Save