Specifying custom configuration for load balanced services is possible through the use the "LoadBalancerClient" & "LoadBalancerClients" annotations as illustrated below.
How can we specify the same config through Java? We have a case where the services can increase dynamically and we don't want to keep modifying code to add them. Their load balancer configs will remain similar except for the service instances. We are looking to add a generic custom config which can then return the supplier list depending on the service name.
Declaring a bean of type LoadBalancerClientFactory containing the list of all applicable LoadBalancerClientSpecification did the trick. Pretty straightforward but had to dig around to figure out which bean to expose as there was no example that I could find.