diff --git a/src/adservice-v2/src/main/java/org/daocloud/springcloud/adservice/controller/HelloWorld.java b/src/adservice-v2/src/main/java/org/daocloud/springcloud/adservice/controller/HelloWorld.java index af7532e9a9..e517fb833f 100644 --- a/src/adservice-v2/src/main/java/org/daocloud/springcloud/adservice/controller/HelloWorld.java +++ b/src/adservice-v2/src/main/java/org/daocloud/springcloud/adservice/controller/HelloWorld.java @@ -14,6 +14,7 @@ import java.net.InetAddress; import java.net.UnknownHostException; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -161,4 +162,17 @@ public Mono healthz() throws UnknownHostException { return Mono.just("ok"); } + @RequestMapping(value = "return-body", method = RequestMethod.POST) + public Mono returnBody(@RequestBody String body) { + return Mono.just(body); + } + + @RequestMapping("/custom-return-size") + public Mono customReturnSize(@RequestParam(required = false,defaultValue = "10") Long size){ + char[] chars = new char[size.intValue()]; + Arrays.fill(chars, 'a'); + return Mono.just(new String(chars)); + } + + }