Eureka多網卡下的IP選擇

1.忽略指定名稱的網卡

spring:
  cloud:
    inetutils:
      ignored-interfaces: 
        - docker0
        - veth.*

2.使用正則表達式,指定使用的網絡地址

spring:
  cloud:
    inetutils:
      preferred-networks: 
        - 192.168
        - 10.0

3.只使用站點本地地址

spring:
  cloud:
    inetutils:
      use-only-site-local-interfaces: true

4.手動指定IP地址

eureka:
  instance:
    prefer-ip-address: true
    ip-address: 127.0.0.1

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章