Spring Cloud yml配置文件中 eureka. instance. prefer-ip-address: true

eureka:
client:
service-url:
defaultZone: http://long.abc.com:8761/eureka/ 使用域名访问,这使会需要设置host,设置域名 对应 的IP
instance:
prefer-ip-address: true

instance:
prefer-ip-address: true 的作用是注册服务的时候使用ip地址,ip地址从host里面找。

猜你喜欢

转载自blog.csdn.net/weixin_42844971/article/details/85987959