You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
默认的instanceId是${spring.application.name}-${server.port},则向consul注册服务时的serviceId是service:${spring.application.name}-${server.port}
当 service 部署多个实例在某些容器平台时(port往往一致),会导致serviceId重复而只能注册最后一个服务。
默认的instanceId是${spring.application.name}-${server.port},则向consul注册服务时的serviceId是service:${spring.application.name}-${server.port}
当 service 部署多个实例在某些容器平台时(port往往一致),会导致serviceId重复而只能注册最后一个服务。
可以通过添加以下配置避免这个问题:
spring.cloud.consul.discovery.instanceId: ${spring.application.name}:${spring.application.instance_id:${random.value}}
The text was updated successfully, but these errors were encountered: