public static String getIp(){
        try {
        InetAddress ia=InetAddress.getLocalHost();
//        String localname=ia.getHostName();
        String localip=ia.getHostAddress();
        return localip;
        } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        return "500";
        }

java获取当前服务器ip

相关文章:

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