我试图在非默认模块上运行app引擎端点,但生成的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 explorer来运行api:
修改
上存在相关问题答案 0 :(得分:1)
好吧,让它运转起来。 基本上我在构建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();