【问题标题】:Can we have Api methods in an Api class in backend我们可以在后端的 Api 类中有 Api 方法吗
【发布时间】:2016-07-05 12:01:05
【问题描述】:

我是 android 后端编程的新手。通常我在 API 中创建一个 API 方法。我很好奇我们是否可以在一个类中有两个 API 方法。我在谷歌上搜索,但我没有得到任何答案。 例如,我的代码使用一种 API 方法

  @Api(name = "InformationAPI",
            version = "v1",
            namespace = @ApiNamespace(ownerDomain = "backend.labs.com", ownerName = "backend.labs.com", packagePath = ""))
    public class EntryEndpoint {

        @ApiMethod(name = "addEntry")
        public Result addEntry(
                @Named("Name") String name,

        ) throws SQLException {

            Connection conn = getConnection();
            Result result = new Result();
            Boolean opsFlag;
            try {
                opsFlag = executeInsertQuery(conn, name);
                result.setIsSuccess(opsFlag);
            } catch (SQLException e) {
                e.printStackTrace();
            }
            return result;
        }

【问题讨论】:

  • 什么意思?详细说明您的问题
  • 我编辑了我的问题。对不起,我不熟悉 android 的一些术语。所以请帮助我更恰当地提出我的问题。

标签: android google-app-engine


【解决方案1】:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-06-09
    • 2022-11-10
    • 2022-06-11
    • 2020-10-01
    • 2017-10-31
    • 1970-01-01
    • 2016-04-28
    • 1970-01-01
    相关资源
    最近更新 更多