擷取目前機器ip:
private static String getIpAddress() throws UnknownHostException {
InetAddress address = InetAddress.getLocalHost();
return address.getHostAddress();
}
擷取容器port:
String port = String.valueOf(request.getLocalPort());