获取当前机器ip:

private static String getIpAddress() throws UnknownHostException {   

        InetAddress address = InetAddress.getLocalHost();   

  

        return address.getHostAddress();   

}

 

获取容器port:

String port = String.valueOf(request.getLocalPort());

相关文章:

  • 2021-12-19
  • 2022-12-23
  • 2021-12-19
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-04
  • 2021-09-14
  • 2022-12-23
  • 2021-12-04
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案