小编Way*_*gas的帖子

我的 Google 云端点 API 在 api 资源管理器中不可见

我对谷歌应用引擎和端点非常陌生,一直在编写基本的端点功能并部署到云中。我成功部署了一个 HelloWorld 端点并通过 API Explorer 对其进行了测试:http://localhost:8080/_ah/api/explorer

但是现在当我创建了一个新的端点 API 并遵循相同的步骤(即在 appengine-web.xml 中使用新的 APP 引擎应用程序名称进行部署,以 appengine:update 运行)时,api 资源管理器仍然显示我的 HelloWorld 端点而不是我的新 API“你的第一端点”。

我已经搜索并试图找到无济于事的答案 - 如果这是我的一个非常基本和愚蠢的问题(我确定是),我很抱歉,但如果有人能指出我正确的方向,我将不胜感激我应该做什么。

我的API

    package com.example.zinglife;

    import com.google.api.server.spi.config.Api;
    import com.google.api.server.spi.config.ApiMethod;
    import com.google.api.server.spi.config.ApiMethod.HttpMethod;
    import com.google.api.server.spi.response.NotFoundException;
    import com.google.appengine.api.datastore.Key;
    import com.google.appengine.api.datastore.KeyFactory;


    /**
    * 
    * Defines endpoint functions APIs.
    */
    @Api(name = "yourfirstapi", version = "v1",
    scopes = {Constants.EMAIL_SCOPE },
           clientIds = {Constants.API_EXPLORER_CLIENT_ID},
           description = "API for hello world endpoints.")

    public class YourFirstAPI
    {

    
    @ApiMethod(name = "storeUserModel")

       private User storeUserModel(User user) throws  NotFoundException
     {
         
          String …
Run Code Online (Sandbox Code Playgroud)

google-app-engine google-cloud-endpoints

5
推荐指数
1
解决办法
674
查看次数