I have been using environment variables to set Eureka client service url for my Spring Boot 1.5 application.
Environment=eureka_client_serviceUrl_defaultZone=http://myhost1:8761/eureka/,http://myhost2:8761/eureka/
However, this stopped working after upgrading to Spring Boot 2.
I have tried other combinations but none works.
eureka_client_service_url_defaultZone
eureka_client_service_Url_defaultZone
EUREKA_CLIENT_SERVICEURL_defaultZone
EUREKA_CLIENT_SERVICE_URL_defaultZone
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE
EUREKA_CLIENT_SERVICEURL_DEFAULT_ZONE
EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE
EUREKA_CLIENT_SERVICE_URL_DEFAULT_ZONE
Does anyone know why?
Is it because eureka.client.serviceUrl
is actually a HashMap
, and the recently tighten-up relaxed binding does not work for HashMap
with a key consisting of multiple words (i.e. defaultZone
)?