【发布时间】:2015-02-11 01:30:35
【问题描述】:
我有两个不同的云端点方法,有两个不同的名称签名
@ApiMethod(name = "getWhiteCats", httpMethod = HttpMethod.POST)
public CollectionResponse<Cat> getWhiteCats(CatCall request)
和
@ApiMethod(name = "getGrayCats", httpMethod = HttpMethod.POST)
public CollectionResponse<Cat> getGrayCats(CatCall request)
但是 Eclipse 给出了例外
描述资源位置路径类型生成时出现问题 您的 Cloud Endpoints 类的 API 元数据: com.google.api.server.spi.config.validation.DuplicateRestPathException: 具有相同休息路径的多个方法“POST collectionresponse_cat":"getWhiteCats" 和 "getGrayCats"
有什么想法可以解决这个问题吗?
【问题讨论】:
-
我想看看有没有办法通过注解来指定返回值的名称,但是我没有看到。
-
我通过为其中一种方法创建自己的包装类来解决它。
标签: java eclipse google-app-engine google-cloud-endpoints google-eclipse-plugin