You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by "liubao68 (via GitHub)" <gi...@apache.org> on 2023/03/01 01:00:41 UTC

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #3687: pojo 调用 SpringMVC 报错 msg={message=Body parameter is required.

liubao68 commented on issue #3687:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3687#issuecomment-1449154347

   这个是设计约束。 java chassis是基于Open API的RPC框架,每个定义都会生成swagger, 默认情况下swagger的参数名称(body, header等)就是方法的参数名称。 客户端也是根据swagger的参数名进行传参,才能够正确构造参数。 
   
   这个可能和大家平时使用其他RPC不太一样(比如gRPC等), 一个好的习惯是可以在服务端和客户端用 `@RequestParam`指定参数名称,这样写代码会多一些,但是不用依赖编译的时候添加 `-parameters` 参数。 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org