mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
4.3.4
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
# changelog
|
# changelog
|
||||||
|
|
||||||
|
## 4.3.4
|
||||||
|
|
||||||
|
- 修复Request参数在第一位导致绑定失败问题
|
||||||
|
|
||||||
## 4.3.3
|
## 4.3.3
|
||||||
|
|
||||||
- 修复获取eureka地址问题
|
- 修复获取eureka地址问题
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>doc</artifactId>
|
<artifactId>doc</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!-- Generic properties -->
|
<!-- Generic properties -->
|
||||||
|
2
pom.xml
2
pom.xml
@@ -11,7 +11,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-parent</artifactId>
|
<artifactId>sop-parent</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<description>一个开放平台解决方案项目,基于Spring Cloud实现,目标是能够让用户快速得搭建起自己的开放平台</description>
|
<description>一个开放平台解决方案项目,基于Spring Cloud实现,目标是能够让用户快速得搭建起自己的开放平台</description>
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-parent</artifactId>
|
<artifactId>sop-parent</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -5,13 +5,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-parent</artifactId>
|
<artifactId>sop-parent</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>sop-admin-server</artifactId>
|
<artifactId>sop-admin-server</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-parent</artifactId>
|
<artifactId>sop-parent</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sdk-java</artifactId>
|
<artifactId>sdk-java</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- http请求 -->
|
<!-- http请求 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-parent</artifactId>
|
<artifactId>sop-parent</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-common</artifactId>
|
<artifactId>sop-common</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-common</artifactId>
|
<artifactId>sop-common</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-common</artifactId>
|
<artifactId>sop-common</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -6,13 +6,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-common</artifactId>
|
<artifactId>sop-common</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>sop-service-common</artifactId>
|
<artifactId>sop-service-common</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -209,7 +209,11 @@ public class ApiArgumentResolver implements SopHandlerMethodArgumentResolver {
|
|||||||
*/
|
*/
|
||||||
protected Object getParamObject(MethodParameter methodParameter, NativeWebRequest nativeWebRequest) {
|
protected Object getParamObject(MethodParameter methodParameter, NativeWebRequest nativeWebRequest) {
|
||||||
HttpServletRequest request = (HttpServletRequest) nativeWebRequest.getNativeRequest();
|
HttpServletRequest request = (HttpServletRequest) nativeWebRequest.getNativeRequest();
|
||||||
OpenContextImpl openContext = initOpenContextImpl(nativeWebRequest);
|
ServiceContext currentContext = ServiceContext.getCurrentContext();
|
||||||
|
OpenContextImpl openContext = (OpenContextImpl)currentContext.getOpenContext();
|
||||||
|
if (openContext == null) {
|
||||||
|
openContext = initOpenContextImpl(nativeWebRequest);
|
||||||
|
}
|
||||||
Map<String, Object> requestParams = openContext.getParameterMap();
|
Map<String, Object> requestParams = openContext.getParameterMap();
|
||||||
Object bizObj = requestParams.get(ParamNames.BIZ_CONTENT_NAME);
|
Object bizObj = requestParams.get(ParamNames.BIZ_CONTENT_NAME);
|
||||||
String bizContent = bizObj == null ? null : bizObj.toString();
|
String bizContent = bizObj == null ? null : bizObj.toString();
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-parent</artifactId>
|
<artifactId>sop-parent</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-parent</artifactId>
|
<artifactId>sop-parent</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-parent</artifactId>
|
<artifactId>sop-parent</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -9,6 +9,7 @@ import com.gitee.sop.servercommon.bean.ServiceContext;
|
|||||||
import com.gitee.sop.servercommon.exception.ServiceException;
|
import com.gitee.sop.servercommon.exception.ServiceException;
|
||||||
import com.gitee.sop.storyweb.controller.param.ArrayElementParam;
|
import com.gitee.sop.storyweb.controller.param.ArrayElementParam;
|
||||||
import com.gitee.sop.storyweb.controller.param.CategoryParam;
|
import com.gitee.sop.storyweb.controller.param.CategoryParam;
|
||||||
|
import com.gitee.sop.storyweb.controller.param.GoodsParam;
|
||||||
import com.gitee.sop.storyweb.controller.param.LargeTextParam;
|
import com.gitee.sop.storyweb.controller.param.LargeTextParam;
|
||||||
import com.gitee.sop.storyweb.controller.param.MemberInfoGetParam;
|
import com.gitee.sop.storyweb.controller.param.MemberInfoGetParam;
|
||||||
import com.gitee.sop.storyweb.controller.param.StoryParam;
|
import com.gitee.sop.storyweb.controller.param.StoryParam;
|
||||||
@@ -132,6 +133,12 @@ public class Example1001_BaseController {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Open("story.system.param.get4")
|
||||||
|
@RequestMapping("/get/system/param/v4")
|
||||||
|
public Object addGoods3(HttpServletRequest request, StoryParam param) {
|
||||||
|
return param;
|
||||||
|
}
|
||||||
|
|
||||||
// 参数绑定,少量参数可以这样写,参数多了建议放进类里面
|
// 参数绑定,少量参数可以这样写,参数多了建议放进类里面
|
||||||
@Open(value = "story.oneparam")
|
@Open(value = "story.oneparam")
|
||||||
@GetMapping("/oneParam/v1")
|
@GetMapping("/oneParam/v1")
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-parent</artifactId>
|
<artifactId>sop-parent</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-parent</artifactId>
|
<artifactId>sop-parent</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -4,13 +4,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-parent</artifactId>
|
<artifactId>sop-parent</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>sdk-java</artifactId>
|
<artifactId>sdk-java</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!-- Generic properties -->
|
<!-- Generic properties -->
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-parent</artifactId>
|
<artifactId>sop-parent</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -404,6 +404,24 @@ public class AllInOneTest extends TestBase {
|
|||||||
client.execute(requestBuilder);
|
client.execute(requestBuilder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testParamBind() {
|
||||||
|
Client.RequestBuilder requestBuilder = new Client.RequestBuilder()
|
||||||
|
.method("story.system.param.get4")
|
||||||
|
.version("1.0")
|
||||||
|
.bizContent(new BizContent().add("id", "1").add("name", "葫芦娃"))
|
||||||
|
.postJson(true)
|
||||||
|
.httpMethod(HttpTool.HTTPMethod.POST)
|
||||||
|
.callback((requestInfo, responseData) -> {
|
||||||
|
System.out.println(responseData);
|
||||||
|
String node = requestInfo.getDataNode();
|
||||||
|
JSONObject jsonObject = JSON.parseObject(responseData).getJSONObject(node);
|
||||||
|
Assert.assertEquals(1L, jsonObject.getLongValue("id"));
|
||||||
|
Assert.assertEquals("葫芦娃", jsonObject.getString("name"));
|
||||||
|
});
|
||||||
|
|
||||||
|
client.execute(requestBuilder);
|
||||||
|
}
|
||||||
|
|
||||||
static class BizContent extends HashMap<String, Object> {
|
static class BizContent extends HashMap<String, Object> {
|
||||||
public BizContent add(String key, Object value) {
|
public BizContent add(String key, Object value) {
|
||||||
this.put(key, value);
|
this.put(key, value);
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-parent</artifactId>
|
<artifactId>sop-parent</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-website</artifactId>
|
<artifactId>sop-website</artifactId>
|
||||||
<version>4.3.3-SNAPSHOT</version>
|
<version>4.3.4-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user