标签:
获取当前机器ip:
private static String getIpAddress() throws UnknownHostException {
InetAddress address = InetAddress.getLocalHost();
return address.getHostAddress();
}
获取容器port:
String port = String.valueOf(request.getLocalPort());
标签:
原文地址:http://www.cnblogs.com/yhtboke/p/5749968.html