liubao68 commented on a change in pull request #522: [SCB-266] Support generic 
rest
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/522#discussion_r162770603
 
 

 ##########
 File path: 
demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/CodeFirstSpringmvc.java
 ##########
 @@ -389,6 +390,23 @@ public Object testObject(@RequestBody Object input) {
 
   @PostMapping(path = "/generic")
   public Holder<User> testGeneric(@RequestBody Holder<User> input) {
+    Assert.isInstanceOf(Holder.class, input);
+    Assert.isInstanceOf(User.class, input.value);
+    return input;
+  }
+
+  @PostMapping(path = "/generic1")
+  public Generic<User> testGeneric1(@RequestBody Generic<User> input) {
+    Assert.isInstanceOf(Generic.class, input);
+    Assert.isInstanceOf(User.class, input.value);
+    return input;
+  }
+
+  @PostMapping(path = "/generic2")
+  public Generic<Generic<User>> testGeneric2(@RequestBody 
Generic<Generic<User>> input) {
 
 Review comment:
   We can add more test cases such as Long, Status(enum),Date types. Because 
before found in highway, Long is not supported. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to