簡體   English   中英

在非默認模塊上運行Appengine端點

[英]Run appengine endpoints on non-default module

我試圖在非默認模塊上運行App Engine端點,但是生成的JAR並沒有指向正確的模塊。

我的模塊名稱是:

<module>business-module</module>

我使用以下命令生成JAR:

business-module:appengineEndpointsInstallClientLibs

當我打開產生的罐子時,我看到:

public static final String DEFAULT_ROOT_URL = "https://project-id.appspot.com/_ah/api/";
public static final String DEFAULT_SERVICE_PATH = "blahApi/v1/";
public static final String DEFAULT_BASE_URL = "https://project-id.appspot.com/_ah/api/blahApi/v1/";

但是從技術上講應該是:

public static final String DEFAULT_ROOT_URL = "https://1-dot-business-module-dot-project-id.appspot.com/_ah/api/";
public static final String DEFAULT_SERVICE_PATH = "blahApi/v1/";
public static final String DEFAULT_BASE_URL = "https://1-dot-business-module-dot-project-id.appspot.com/_ah/api/blahApi/v1/";

我可以通過以下方式從api資源管理器中運行api:

https://apis-explorer.appspot.com/apis-explorer/?base=https://1-dot-business-module-dot-project-id.appspot.com/_ah/api#p

編輯

錯誤跟蹤器上有一個相關問題

好吧,讓它正常工作。 基本上,我在構建Api時將rootURL設置為指向正確的模塊:

final BlahApi businessApi = CloudEndPointsUtils.updateBuilder(new BlahApi.Builder(transport, factory, credential)
.setRootUrl("https://1-dot-business-module-dot-project-id.appspot.com/_ah/api/")).build();

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM