google-app-engine - 我可以在 Google Cloud End Point 中返回一个泛型吗

标签 google-app-engine google-cloud-endpoints

当我返回通用时,终点 api 文件似乎消失了。示例代码已粘贴。

@ApiMethod
public RestResponse<Container> testGeneric() {
    Container container = new Container();

    container.testLong =  (long)4345;
    container.testDate = new Date();
    container.testString = "sathya";
    container.testDouble = 123.98;
    container.testInt = 123;

    RestResponse<Container> response = new RestResponse<Container>();
    response.t = container;

    return response;        
}

这是端点中的错误吗?根本不允许这样的事情吗?

问候, 沙迪亚

最佳答案

我不认为这是一个错误,但它只是不受支持,就像你不能从你的端点返回一个 String 一样......

为了检查问题是什么,如果您使用的是适用于 Eclipse 的 Google 插件,您可以在 Window -> Show View -> Error Log 下查看错误日志以获取更多信息.

关于google-app-engine - 我可以在 Google Cloud End Point 中返回一个泛型吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15945554/

相关文章:

java - 对谷歌驱动器实现服务器端授权的问题

ajax - ProtoRPC API 是 ajax 内置的 GAE 吗?

java - 修补 Jersey 以使用 asm-4

java - 具有 Cloud SQL 的 Cloud Endpoints 示例代码

eclipse - 是否可以使用 Eclipse IDE 和 GAE 插件通过 PlayFramework 开发和部署 Scala 应用程序?

python - 从 PdfFileWriter 创建 blobstore 文件

google-app-engine - 使用 oAuth 的 GAE 端点上的 CSRF

java - 获取巨大的 Firebase 访问 token

Java Google Cloud Endpoints 教程 api 未出现在查看器中

java - App Engine 中的 UserService、OAuth 和 AJAX