diff --git a/changelog.md b/changelog.md index 56f43429..2288d657 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # changelog +## 4.4.1 + +- 修复单值参数绑定问题 + ## 4.4.0 **【重要】:升级前请阅读 [升级到4.4.0注意事项](./升级到4.4.0注意事项.md)** diff --git a/doc/pom.xml b/doc/pom.xml index e9a5fcc0..e11f02e8 100644 --- a/doc/pom.xml +++ b/doc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.gitee.sop doc - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 807bed5c..f17f2788 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ 4.0.0 com.gitee.sop sop-parent - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT pom 一个开放平台解决方案项目,基于Spring Cloud实现,目标是能够让用户快速得搭建起自己的开放平台 diff --git a/sop-admin/pom.xml b/sop-admin/pom.xml index 25ec91df..c6cf57fb 100644 --- a/sop-admin/pom.xml +++ b/sop-admin/pom.xml @@ -6,7 +6,7 @@ com.gitee.sop sop-parent - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../pom.xml diff --git a/sop-admin/sop-admin-server/pom.xml b/sop-admin/sop-admin-server/pom.xml index 701a365d..38dd1cc8 100644 --- a/sop-admin/sop-admin-server/pom.xml +++ b/sop-admin/sop-admin-server/pom.xml @@ -5,13 +5,13 @@ com.gitee.sop sop-parent - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../../pom.xml 4.0.0 sop-admin-server - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT jar diff --git a/sop-auth/pom.xml b/sop-auth/pom.xml index b19b560a..94cc2057 100644 --- a/sop-auth/pom.xml +++ b/sop-auth/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-parent - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../pom.xml @@ -37,7 +37,7 @@ com.gitee.sop sdk-java - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT diff --git a/sop-common/pom.xml b/sop-common/pom.xml index 378e02b5..7e0a4700 100644 --- a/sop-common/pom.xml +++ b/sop-common/pom.xml @@ -6,7 +6,7 @@ com.gitee.sop sop-parent - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../pom.xml diff --git a/sop-common/sop-bridge-eureka/pom.xml b/sop-common/sop-bridge-eureka/pom.xml index 8b122f5d..068047cb 100644 --- a/sop-common/sop-bridge-eureka/pom.xml +++ b/sop-common/sop-bridge-eureka/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-common - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/sop-common/sop-bridge-nacos/pom.xml b/sop-common/sop-bridge-nacos/pom.xml index e394afa0..c4236651 100644 --- a/sop-common/sop-bridge-nacos/pom.xml +++ b/sop-common/sop-bridge-nacos/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-common - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/sop-common/sop-gateway-common/pom.xml b/sop-common/sop-gateway-common/pom.xml index 49acb240..d1c769bf 100644 --- a/sop-common/sop-gateway-common/pom.xml +++ b/sop-common/sop-gateway-common/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-common - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../pom.xml diff --git a/sop-common/sop-service-common/pom.xml b/sop-common/sop-service-common/pom.xml index 23850b13..d0fabe79 100644 --- a/sop-common/sop-service-common/pom.xml +++ b/sop-common/sop-service-common/pom.xml @@ -1,22 +1,45 @@ - - - com.gitee.sop - sop-common - 4.4.0-SNAPSHOT - ../pom.xml - - 4.0.0 + com.gitee.sop sop-service-common - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT jar 1.8 + + + 2.3.2.RELEASE + + Hoxton.SR8 + + + 2.2.5.RELEASE + + + 1.2.3 + + 4.11 + 1.2.73 + 2.5 + 1.3.3 + 3.2.2 + 3.8.1 + 1.11 + 1.2 + 2.0.1.Final + 6.0.13.Final + 1.9.1 + 29.0-jre + 1.5.21 + 2.9.2 + 2.9.2 + 1.16.9 + 6.2 + 5.2.0 @@ -108,5 +131,179 @@ + + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + com.alibaba.cloud + spring-cloud-alibaba-dependencies + ${spring-cloud-alibaba.version} + pom + import + + + + com.google.guava + guava + ${guava.version} + + + + com.alibaba + fastjson + ${fastjson.version} + + + + net.oschina.durcframework + fastmybatis-spring-boot-starter + ${fastmybatis.version} + + + + io.springfox + springfox-spring-web + ${springfox-spring-web.version} + + + io.swagger + swagger-annotations + ${swagger.version} + + + io.springfox + springfox-swagger2 + ${springfox-swagger2.version} + + + + net.oschina.durcframework + easyopen + ${easyopen.version} + + + + com.squareup.okhttp3 + okhttp + 3.14.7 + + + + net.oschina.durcframework + easyopen-spring-boot-starter + ${easyopen.version} + + + + javax.validation + validation-api + ${validation-api.version} + + + org.hibernate + hibernate-validator + ${hibernate-validator.version} + + + + ch.qos.logback + logback-classic + ${logback.version} + + + + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + + + commons-collections + commons-collections + ${commons-collection.version} + + + commons-io + commons-io + ${commons-io.version} + + + commons-codec + commons-codec + ${commons-codec.version} + + + commons-fileupload + commons-fileupload + ${commons-fileupload.version} + + + commons-logging + commons-logging + ${commons-logging.version} + + + + org.ow2.asm + asm + ${asm.version} + + + + com.github.pagehelper + pagehelper + ${pagehelper.version} + + + + org.projectlombok + lombok + 1.18.4 + + + javax.servlet + javax.servlet-api + 3.1.0 + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12.4 + + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + ${java.version} + ${java.version} + UTF-8 + + + + diff --git a/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/param/SingleParameterContext.java b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/param/SingleParameterContext.java index d2574df6..e6d7aaed 100644 --- a/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/param/SingleParameterContext.java +++ b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/param/SingleParameterContext.java @@ -25,8 +25,8 @@ public class SingleParameterContext { public static void add(Parameter parameter, Open open) { String version = open.version(); version = "".equals(version) ? ServiceConfig.getInstance().getDefaultVersion() : version; - String key = open.value() + version; String parameterName = parameter.getName(); + String key = open.value() + version + parameterName; Class wrapClass = singleFieldWrapper.create(parameter, parameterName); SingleParameterContextValue value = new SingleParameterContextValue(); value.setParameterName(parameterName); diff --git a/sop-example/pom.xml b/sop-example/pom.xml index d3cf02b6..7f3d1ab1 100644 --- a/sop-example/pom.xml +++ b/sop-example/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-parent - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../pom.xml diff --git a/sop-example/sop-springmvc/pom.xml b/sop-example/sop-springmvc/pom.xml index d045afac..a0185c51 100644 --- a/sop-example/sop-springmvc/pom.xml +++ b/sop-example/sop-springmvc/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-parent - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../../pom.xml diff --git a/sop-example/sop-story/pom.xml b/sop-example/sop-story/pom.xml index f7829a43..c1163610 100644 --- a/sop-example/sop-story/pom.xml +++ b/sop-example/sop-story/pom.xml @@ -4,7 +4,7 @@ com.gitee.sop sop-parent - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../../pom.xml diff --git a/sop-example/sop-story/src/main/java/com/gitee/sop/storyweb/controller/Example1001_BaseController.java b/sop-example/sop-story/src/main/java/com/gitee/sop/storyweb/controller/Example1001_BaseController.java index 28839f3e..3b04aa6d 100644 --- a/sop-example/sop-story/src/main/java/com/gitee/sop/storyweb/controller/Example1001_BaseController.java +++ b/sop-example/sop-story/src/main/java/com/gitee/sop/storyweb/controller/Example1001_BaseController.java @@ -171,7 +171,7 @@ public class Example1001_BaseController { // 参数绑定 @Open(value = "story.param.bind", mergeResult = false) @RequestMapping("/get/param/v1") - public StoryResult param(@RequestParam("id") Integer id, @RequestParam String name) { + public StoryResult param(String id, String name) { StoryResult result = new StoryResult(); result.setName("参数绑定:id:" + id + ", name:" + name); return result; diff --git a/sop-gateway/pom.xml b/sop-gateway/pom.xml index 856953d2..79f4f5aa 100644 --- a/sop-gateway/pom.xml +++ b/sop-gateway/pom.xml @@ -4,7 +4,7 @@ com.gitee.sop sop-parent - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../pom.xml diff --git a/sop-gateway/src/main/java/com/gitee/sop/gateway/interceptor/MyRouteInterceptor.java b/sop-gateway/src/main/java/com/gitee/sop/gateway/interceptor/MyRouteInterceptor.java index 8e534a70..b0071330 100644 --- a/sop-gateway/src/main/java/com/gitee/sop/gateway/interceptor/MyRouteInterceptor.java +++ b/sop-gateway/src/main/java/com/gitee/sop/gateway/interceptor/MyRouteInterceptor.java @@ -5,6 +5,7 @@ import com.gitee.sop.gatewaycommon.interceptor.RouteInterceptorContext; import com.gitee.sop.gatewaycommon.param.ApiParam; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; +import org.springframework.util.StringUtils; import org.springframework.web.server.ServerWebExchange; import java.net.URI; @@ -34,6 +35,10 @@ public class MyRouteInterceptor implements RouteInterceptor { @Override public void afterRoute(RouteInterceptorContext context) { + String serviceErrorMsg = context.getServiceErrorMsg(); + if (StringUtils.hasText(serviceErrorMsg)) { + log.error("错误信息:{}", serviceErrorMsg); + } } @Override diff --git a/sop-sdk/pom.xml b/sop-sdk/pom.xml index ffb39022..b0204794 100644 --- a/sop-sdk/pom.xml +++ b/sop-sdk/pom.xml @@ -6,7 +6,7 @@ com.gitee.sop sop-parent - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../pom.xml diff --git a/sop-sdk/sdk-java/pom.xml b/sop-sdk/sdk-java/pom.xml index 01f148f0..93b58071 100644 --- a/sop-sdk/sdk-java/pom.xml +++ b/sop-sdk/sdk-java/pom.xml @@ -4,13 +4,13 @@ com.gitee.sop sop-parent - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../../pom.xml 4.0.0 sdk-java - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT diff --git a/sop-sdk/sdk-java/src/main/java/com/gitee/sop/sdk/request/BaseRequest.java b/sop-sdk/sdk-java/src/main/java/com/gitee/sop/sdk/request/BaseRequest.java index 66a4e6ff..afe7ed69 100644 --- a/sop-sdk/sdk-java/src/main/java/com/gitee/sop/sdk/request/BaseRequest.java +++ b/sop-sdk/sdk-java/src/main/java/com/gitee/sop/sdk/request/BaseRequest.java @@ -44,6 +44,8 @@ public abstract class BaseRequest { private String bizContent = EMPTY_JSON; private Object bizModel; + private RequestMethod requestMethod = RequestMethod.POST; + /** * 上传文件 */ @@ -144,13 +146,12 @@ public abstract class BaseRequest { return responseClass; } - /** - * 指定HTTP请求method,默认POST - * - * @return - */ - protected RequestMethod getRequestMethod() { - return RequestMethod.POST; + + public RequestMethod getRequestMethod() { + return requestMethod; } + public void setRequestMethod(RequestMethod requestMethod) { + this.requestMethod = requestMethod; + } } diff --git a/sop-sdk/sdk-java/src/test/java/com/gitee/sop/sdk/SdkTest.java b/sop-sdk/sdk-java/src/test/java/com/gitee/sop/sdk/SdkTest.java index 8ba796a2..c2fc7d2c 100644 --- a/sop-sdk/sdk-java/src/test/java/com/gitee/sop/sdk/SdkTest.java +++ b/sop-sdk/sdk-java/src/test/java/com/gitee/sop/sdk/SdkTest.java @@ -3,6 +3,7 @@ package com.gitee.sop.sdk; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.gitee.sop.sdk.client.OpenClient; +import com.gitee.sop.sdk.common.RequestMethod; import com.gitee.sop.sdk.common.UploadFile; import com.gitee.sop.sdk.model.DemoFileUploadModel; import com.gitee.sop.sdk.model.GetStoryModel; @@ -65,6 +66,7 @@ public class SdkTest extends TestCase { Map bizModel = new HashMap<>(); bizModel.put("name", "白雪公主"); request.setBizModel(bizModel); +// request.setRequestMethod(RequestMethod.GET); // 发送请求 CommonResponse response = client.execute(request); diff --git a/sop-test/pom.xml b/sop-test/pom.xml index db45c02e..e9b147bd 100644 --- a/sop-test/pom.xml +++ b/sop-test/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-parent - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../pom.xml diff --git a/sop-website/pom.xml b/sop-website/pom.xml index b0f9bc3f..4c09b69c 100644 --- a/sop-website/pom.xml +++ b/sop-website/pom.xml @@ -6,7 +6,7 @@ com.gitee.sop sop-parent - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../pom.xml diff --git a/sop-website/sop-website-server/pom.xml b/sop-website/sop-website-server/pom.xml index c61693a0..dda5eef8 100644 --- a/sop-website/sop-website-server/pom.xml +++ b/sop-website/sop-website-server/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-website - 4.4.0-SNAPSHOT + 4.4.1-SNAPSHOT ../pom.xml