spring-cloud-commons
spring-cloud-commons copied to clipboard
Simple Discovery properties does not respect user configuration
Describe the bug I expect environment variables to be usable to configure simple discovery. The loop initializing the serviceId in the configured simple service properties breaks user config if done [1]. Is it possible to change this loop logic ([1]) to set the service id if not set and if set ensure the key is the serviceId configured and not the deduced one with spring env->properties mapping logic which is easily wrong if the services use iphen in the name.
Sample Not sure it is needed.
[1] https://github.com/spring-cloud/spring-cloud-commons/blob/main/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/simple/SimpleDiscoveryProperties.java#L81