jsk 图片同步

This commit is contained in:
skjia 2025-03-21 09:20:34 +08:00
parent 59e769549e
commit 35fa8cc00d
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ public class GreenImageInfo implements java.io.Serializable {
String serverIP=""; String serverIP="";
try{ try{
InetAddress ip = InetAddress.getLocalHost(); InetAddress ip = InetAddress.getLocalHost();
serverIP= ip.getHostAddress(); serverIP= ip.getHostName();
System.out.println("Server IP: " + serverIP); System.out.println("Server IP: " + serverIP);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();