You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/04/24 09:27:18 UTC
[incubator-servicecomb-website] branch master updated: add Q&A
about @ApiOperation (#68)
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-website.git
The following commit(s) were added to refs/heads/master by this push:
new 395674b add Q&A about @ApiOperation (#68)
395674b is described below
commit 395674b8f9a8d2b63b4499922b5b9c0b68ba2834
Author: zhengyangyong <ya...@huawei.com>
AuthorDate: Tue Apr 24 17:27:16 2018 +0800
add Q&A about @ApiOperation (#68)
Signed-off-by: zhengyangyong <ya...@huawei.com>
---
_faqs/cn/faq.md | 4 ++++
1 file changed, 4 insertions(+)
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*的文件,其内容可以为空。
--
To stop receiving notification emails like this one, please contact
ningjiang@apache.org.