【笔记】Eureka显示正确的网卡 发表于 2020-12-01 更新于 2024-04-17 分类于 Java后端学习指北 阅读次数: 前言Eureka显示正确的网卡 配置正确的网卡 创建bootstrap.yml配置文件 123456789spring: cloud: inetutils: preferred-networks: # 配置正确的网卡 - 192\.168\.3\..+ ignored-interfaces: # 配置要忽略的网卡(可选) - utun.+ 配置正确的显示 编辑application.yml配置文件 123456eureka: instance: prefer-ip-address: true # 显示格式(可选) instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port} 完成