java获取系统当前服务器IP地址
public String getServiceIp(){
InetAddress address;
String myIp;
try {
address = InetAddress.getLocalhost();
myIp = address.getHostAddress();
} catch (UnknowHostException e) {
e.printStackTrace();
}
return myIp;
}