此代码应返回主机名,但 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;
}