MCPcopy Create free account
hub / github.com/Bit0r/java-util / getIp

Method getIp

src/main/java/util/CommonUtils.java:575–585  ·  view source on GitHub ↗

获取服务器ip @return

()

Source from the content-addressed store, hash-verified

573 * @return
574 */
575 public static String getIp(){
576 InetAddress address = null;
577 String ip = "";
578 try {
579 address = InetAddress.getLocalHost();
580 ip = address.getHostAddress();
581 } catch (UnknownHostException e) {
582 e.printStackTrace();
583 }
584 return ip;
585 }
586
587 /**
588 * 根据身份证号获取年龄

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected