mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
2.5.7
This commit is contained in:
@@ -18,6 +18,7 @@ import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
@@ -141,6 +142,17 @@ public class AlipayController {
|
||||
return story;
|
||||
}
|
||||
|
||||
// http://localhost:2222/getStory33
|
||||
// 遗留接口具备开放平台能力
|
||||
@ApiAbility
|
||||
@PostMapping("getStory33")
|
||||
public StoryResult getStory22(@RequestBody StoryParam param) {
|
||||
StoryResult story = new StoryResult();
|
||||
story.setId(1L);
|
||||
story.setName("遗留接口,param:" + param);
|
||||
return story;
|
||||
}
|
||||
|
||||
// http://localhost:2222/getStory2?version=2.1
|
||||
// 遗留接口具备开放平台能力,在原来的基础上加版本号
|
||||
@ApiAbility(version = "2.1")
|
||||
|
@@ -64,6 +64,22 @@ public class AllInOneTest extends TestBase {
|
||||
client.execute(requestBuilder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试遗留接口
|
||||
* 以json方式提交(application/json)
|
||||
*/
|
||||
public void testPostJSON2() {
|
||||
Client.RequestBuilder requestBuilder = new Client.RequestBuilder()
|
||||
.method("getStory33")
|
||||
.version("1.0")
|
||||
// 以json方式提交
|
||||
.postJson(true)
|
||||
.bizContent(new BizContent().add("id", "1").add("name", "葫芦娃"))
|
||||
.httpMethod(HttpTool.HTTPMethod.POST);
|
||||
|
||||
client.execute(requestBuilder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试feign。gateway -> book-service(consumer) -> story-service(provider)
|
||||
*/
|
||||
|
Reference in New Issue
Block a user