mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
修复请求体超过256KB无法请求问题
This commit is contained in:
@@ -2,6 +2,7 @@ package com.gitee.sop.storyweb.controller;
|
||||
|
||||
import com.gitee.sop.servercommon.annotation.Open;
|
||||
import com.gitee.sop.storyweb.controller.param.CategoryParam;
|
||||
import com.gitee.sop.storyweb.controller.param.LargeTextParam;
|
||||
import com.gitee.sop.storyweb.controller.param.StoryParam;
|
||||
import com.gitee.sop.storyweb.controller.result.CategoryResult;
|
||||
import com.gitee.sop.storyweb.controller.result.StoryResult;
|
||||
@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -69,6 +71,15 @@ public class Example1001_BaseController {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Open(value = "story.get.large")
|
||||
@RequestMapping("/get/large/v1")
|
||||
public StoryResult getStoryLarge(LargeTextParam param) {
|
||||
StoryResult result = new StoryResult();
|
||||
int length = param.getContent().getBytes(StandardCharsets.UTF_8).length;
|
||||
result.setName("length:" + length);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 返回数组结果
|
||||
@ApiOperation(value = "返回数组结果", notes = "返回数组结果")
|
||||
@Open("story.list")
|
||||
|
@@ -0,0 +1,11 @@
|
||||
package com.gitee.sop.storyweb.controller.param;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author tanghc
|
||||
*/
|
||||
@Data
|
||||
public class LargeTextParam {
|
||||
private String content;
|
||||
}
|
Reference in New Issue
Block a user