Eureka多网卡下IP选择
对于多网卡的服务器,如何指定注册到Eureka Server的IP呢
有四种方式可以使用
前提是eureka.instance.prefer-ip-address为true
忽略指定名称的网卡
            
            
              yaml
              
              
            
          
          spring:
	cloud:
		inetutils:
			ignored-interfaces: #忽略eth0和以veth开头的网卡
				- eth0
				- veth.*使用正则表达式指定网络地址
            
            
              yaml
              
              
            
          
          spring:
	cloud:
		inetutils:
			preferredNetworks:
			 - 192.168
			 - 10.0只使用站点本地地址
            
            
              yaml
              
              
            
          
          spring:
	cloud:
		inetutils:
			useOnlySiteLocalInterfaces: true指定IP地址
            
            
              yaml
              
              
            
          
          eureka:
	instance:
		ip-address: 127.0.0.1
			https://zhhll.icu/2022/框架/微服务/springcloud/注册中心/Eureka/6.Eureka多网卡下IP选择/