【发布时间】:2018-04-04 16:44:36
【问题描述】:
此代码应返回 主机名,但 Capedwarf 运行时返回此代码的 null:
public String getHostname() {
ApiProxy.Environment proxyEnvironment = ApiProxy.getCurrentEnvironment();
Map<String, Object> attributes = proxyEnvironment.getAttributes();
String hostname = (String) attributes.get(LocalEnvironment.DEFAULT_VERSION_HOSTNAME);
return hostname;
}
【问题讨论】:
标签: java google-app-engine capedwarf