WillemJiang closed pull request #68: add Q&A about @ApiOperation URL: https://github.com/apache/incubator-servicecomb-website/pull/68
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/_faqs/cn/faq.md b/_faqs/cn/faq.md index 13062f6..43533c4 100755 --- a/_faqs/cn/faq.md +++ b/_faqs/cn/faq.md @@ -25,6 +25,10 @@ redirect_from: (2) 所用到的HTTP请求方法一样时,如GET,则方法名不能重载。这是由于生成契约时方法名会作为其Operation ID,所以要保证其唯一性。 (3) 方法和类必须是public的。 +* **Q: 契约生成会报错Caused by: java.lang.Error: OperationId must be unique,不支持函数重载?** + + A: 我们是支持函数重载的, 加上`@ApiOperation`标签即可,demo-pojo中有示例。每个接口必须有唯一的operation id。 + * **Q: 使用*spring-boot-starter-provider*这个依赖时,在*application.yml*文件中声明的`spring.main.web-application`属性并没有生效?** A: 使用*starter-provider*这个依赖时,如果用到了servlet这种方式时,需要在*application.properties*这个文件引入`spring.main.web-application=true`这样的属性或者在*application.yml*文件中声明,但是此时需要新建一个*application.properties*的文件,其内容可以为空。 ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services