hostname解析问题

This commit is contained in:
三丙
2024-10-25 11:16:53 +08:00
parent 490e9baece
commit 7410f5021a

View File

@@ -62,7 +62,7 @@ public class DefaultServiceInfoProvider implements ServiceInfoProvider {
}
log.info("Current Service ID: {}", serviceId);
hostAddress = InetAddress.getLocalHost().getHostName();
hostAddress = InetAddress.getLocalHost().getHostAddress();
log.info("Current Service HostAddress: {}, RestPort:{}, GrpcPort:{}", hostAddress, restPort, grpcPort);
if (serviceType.equalsIgnoreCase("monolith")) {